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
Install Mozilla rr. For installation instructions, see the Building And Installing.
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.
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
In the Trace directory field, specify a path to the trace directory.
In the Debugger tool window, click the Resume Program icon () to continue program execution, or click the Rewind icon below to run the debug session backwards until the previous breakpoint.