GoLand 2018.3 Help

Debugging with Mozilla rr

Mozilla rr is a tool that you can use to record, replay, and debug applications. The main idea of Mozilla rr is to help you catch non-trivial bugs. The rr tool records a program execution. And after the recording, you can replay the execution in the debugger as many times as you need. Read more about Mozilla rr on the official Mozilla rr site.

Debug code with Mozilla rr

  1. Install Mozilla rr. For installation instructions, see the Building And Installing.

  2. In GoLand, set a breakpoint. To set a breakpoint, click the gutter near the code line where you want the debugger to stop code execution. For more information about breakpoints, see Debugging code and Breakpoints.

  3. From the Run menu in the gutter, select Record and Debug <configuration_name>. In the Debugger tool window, you can see a status of variables, processes, and threads on different stages of code execution.

Navigate through the recorded trace

  1. Navigate to Run | Debug Saved Trace.

  2. In the Trace directory field, specify a path to the trace directory.

  3. Click OK.

  4. In the Debugger tool window, click the Resume Program icon (The Resume Program icon ) to continue program execution, or click the Rewind icon below to run the debug session backwards until the previous breakpoint.

Navigate through the recorded trace
Last modified: 11 December 2018