Time travel debugging in IntelliJ¶
If you’re replaying a recording, use the
Or if you’re debugging remotely, launch your application
on the remote machine supplying the LiveRecorder agents on the
Consider adding breakpoints and/or watchpoints before starting the debugger session since your application or recording will start running as soon as you press the Debug button.
Start the debugger session¶
Choose a LiveRecorder Run/Debug configuration from the Run/Debug Configurations dialog and press the Debug button to start debugging.
While your application is running, you can’t interact with it or examine application state. You can only Pause, Stop or Rerun your application. See IntelliJ tips for more info.
Once your application is suspended due to hitting a breakpoint or watchpoint, you can examine variables and the contents of the stack and evaluate arbitrary expressions. Refer to the IntelliJ documentation for details. You can’t alter variables while time-travel debugging, since doing so would likely change the future execution of the application and cause the timelines to diverge.
Forward and reverse execution¶
You can use the familiar Step Over, Step Into, Force Step Into, Step Out and Run to Cursor buttons to step the application forwards, or the Resume button to run the application forwards until it hits a breakpoint or watchpoint.
LiveRecorder for Java adds the Reverse Step Over, Reverse Step Into and Reverse Step Out buttons, which you can use to step the application backwards, and the Reverse Resume button to run your application backwards until it hits a breakpoint or watchpoint.