RustRover 2023.3 Help

Debug tool window

When you start a debug session, the Debug tool window opens automatically. It includes the main debugging toolbar, a stepping actions panel, and various tabs.

Debug tool window tabs

Sessions

When you run several debug sessions, they are separated into tabs in the top part of the Debug tool window.

Sessions tabs

As you debug, the Debug tool window and the editor display information corresponding to the selected session tab. This is important if you are running several debug sessions in parallel that use the same code. To allow multiple debug sessions, go to Run | Edit Configurations and set the Allow parallel run checkbox for required configurations.

Debug tool window tabs

  • Frames: lets you study call stacks of all program threads.

  • Variables: lists the variables available in the current context and lets you analyze and modify the program state.

  • Watches: lets you manage watches. By default, watches are shown on the Variables tab for more efficient use of the screen space. If you have a lot of watches, consider viewing them in a separate tab.

  • Debugger console: displays the GDB/LLDB output and error streams and lets you run debugger commands.

  • Threads: displays the list of live threads and lets you switch between them. From this tab, you can export thread information in text format.

  • Memory View (CLion): shows raw memory of the running process.

Frames and variables

The state of the program is represented by frames. When the program is suspended, the current frame stack is displayed in the left part of the Threads & Variables tab (or the Frames tab in case the Variables tab is hidden):

Frames tab of the Debug tool window

The variables of the selected frame/thread are displayed in the right part of the Threads & Variables tab (or the Variables tab in case the Frames tab is hidden). You can search in this pane by typing right into it and expanding the child nodes of the data structures.

Variables tab and inline variables view

If required, you can change the variable values right in the Variables pane. To do this, right-click the variable and select Set value (or select the variable and press F2):

Set a variable value

Variable values are also shown inline in the editor. Once the variable value has changed, the inline view is updated with the new value and changes its color. To manually change the value of a variable, select it in the tree and click Set Value.

Inlined variable values

Evaluate expressions

Evaluate Expression (Alt+F8) allows you to calculate values on the run and monitor how the result changes as you step.

To evaluate an expression, in the Threads & Variables tab (or the Variables tab in case the Frames tab is hidden), enter the variable or expression that you want to evaluate and press Enter. The result will be displayed right below.

Evaluating an expression

Watches

If you want to keep track of some variable or the result of an expression, set up a watch for it. Watches are evaluated in the context of the selected frame. Mind the limitations for Evaluate expression.

To add a new watch, in the Threads & Variables tab (or the Variables tab in case the Frames tab is hidden), enter the variable or expression that you want to evaluate into the text field and click New Watch button:

Adding a watch

Last modified: 01 December 2023