CLion Tutorial – Hex View & Mute Variables

Hex View
For integer type numeric variables, you can view the hexadecimal representation instead of or alongside the original format.
The hexadecimal view for integer types is supported by GDB and LLDB debuggers on all platforms, including remote debugging and WSL scenarios.

To enable the hexadecimal view, go to Settings | Build, Execution, Deployment | Debugger | Data Views | C/C++.
Check the "Show integers as hexadecimal values" checkbox and choose whether to display only hexadecimal values or to show them alongside the original view:

Now, the hexadecimal format will be displayed in the debug tool window's variables pane as well as inline in the editor's variable view:

Mute Variables During a debugging session, you can view variables in the variables pane of the debug tool window and inline in code.
As you step through the program, these values are recalculated at each step. This can lead to performance degradation, especially when dealing with large structures or arrays.
However, if you don't need to inspect variables at every step, you can choose to view them only when necessary to avoid unnecessary calculations and improve step execution performance.
To do this, use the "Mute Variables" option, and CLion will stop recalculating values at each step, allowing you to load them only when needed.

To enable mute variables, right-click in the variables pane and select "Mute Variables":

Once this option is enabled, CLion will hide the values in the variables pane and the editor, displaying a "Load" link instead:

Use this "Load" link to unmute variables for the current step. The value will appear in both the variables pane and the editor. Note that unless you load the value again, it will not be automatically recalculated in the next step.

"Mute Variables" affects the entire IDE: it will mute for the current and all subsequent debugging sessions across all projects until you unmute.
"Mute Variables" does not change the behavior of watch expressions and breakpoints - they still change values at each step.

Recommended Hot Topics
  • Feishu lays off 1000 employees…

  • Is it only the frontend crashing? Is the backend and testing still okay? Netizens: It’s all the same~

  • 21,000 Stars! A developer’s Swiss Army knife, now open-sourced~

Leave a Comment