[[Property:title|Replay (recorded) execution]]
[[Property:weight|2]]
[[Property:uuid|13932252-4eca-7c71-d047-b0b011e50d60]]
The replay functionality is available from a button on the Call stack tool, or though EiffelStudio's "Execution" menu.


{{note|First, you must be sure execution recording is activated ([[Record execution|read how to record execution]]).}}


Now, whenever the application is stopped in the debugger, you can replay the recorded execution by clicking on the "Replay" button:


[[Image:exec-replay-01]] 


After clicking the "Replay" button, the Call stack tool enters "execution replay" mode, as shown below: 


[[Image:exec-replay-02]]


In "execution replay" mode, the "Replay" button is enabled, and an additional command bar becomes visible with replay control buttons "Back", "Forth", "Previous", "Next", and "Go to". The numbers on the right end of this command bar indicate the call stack depth, the breakable index, and the nested breakable index. The buttons have following meanings:

* '''Back''': means replay back to caller, i.e., down in the call stack.
* '''Forth''': means replay to callee, i.e., up in the call stack.
* '''Previous''': means replay to previous instruction (previous call in the same stack; i.e., similar to step previous) if possible.
* '''Previous''': means replay to next instruction (next call in the same stack; i.e., similar to step next) if possible.
* '''Go to''': replay to the selected call when possible.

Below the command bar, in the first column, you will find a tree structure, which shows, on the root level, the effective call stacks, and for each root node, you can inspect the sub element to browse the call history.<br/>
The '''bold entries''' show the active call stacks (i,e., the current call stack when the debugger was stopped).<br/>
The '''red arrow''' shows the replayed call stack level, and the call stack levels which can be replayed have a light blue background. <br/>


If you expand a node, you will be able to browse the whole recorded execution history from this stack, as shown below (if you expand the bottom node, the whole recorded execution history will be available).

You can still select other call stack levels as you do in normal debugging mode to inspect them. When you do, the red arrow stick to the replayed call, and the green arrow indicates the call stack level you selected. 


[[Image:exec-replay-02-1]]


In the image below, we have clicked on "Back" 3 times. You can now also replay "Forth" 3 times. When you execute a "Replay" operation, the debugger restores the related recorded values, and the various debugger tools are updated with tools values (including the watch tools)


[[Image:exec-replay-03]]


And then if you replay "previous" twice, you rewind the execution in the same call stack frame. Notice the "blue" dot that shows the replayed execution cursor.


[[Image:exec-replay-04]]


{{note|When replaying, you will notice the debugging tools are synchronized and refresh. <br/>
This means the objects tool, the watch tools, and the feature tool will display the replayed context (values, and replayed execution cursor). <br/>
If you evaluate an expression in a watch tool, it will use the recorded values. So, be careful about side effects, because you can modify those values... }}




