Mute variables
During a debug session, you can view variables in the Variables pane of the Debug tool window and inlined in your code.
When you step through the program, the values are re-calculated on each step. This may cause performance degradation, especially in case of large structures or arrays. But if you don't need to explore the variables on each step, you can only view them 'on demand' to avoid unnecessary calculations and improve the stepping performance. For this, use the Mute Variables option, and CLion will stop re-calculating values for every step, letting you load them only when needed.
Right-click in the Variables pane and select Mute Variables:
With this option enabled, CLion hides the values in the Variables pane and the editor, and shows the Load link instead:
Use this Load link to unmute a variable for the current step. The value will appear both in the Variables pane and in the editor. Note that it will not be automatically re-calculated for the next step unless you load the value again.
note
Mute Variables affects the entire IDE: variables are muted for the current and the up-following debug sessions in all projects until you unmute them.
Mute Variables does not change the behavior of watches and watchpoints - they still change values on each step. Also, you can evaluate expressions that contain muted variables:
Thanks for your feedback!