Debug
During a debug session, the debugger interferes with your program execution and provides you with the information on what’s happening under the hood. Watch this video to learn the fundamentals of debugging in CLion:
General debugging procedure
Configure the debugger settings.
For a CMake project, select the desired CMake profile.
If necessary, create or modify an existing run/debug configuration.
Place breakpoints in your code.
Click the Debug <configuration_name> button or use other options to start a debug session.
After you've started a debug session, the icon that marks the Debug tool window toggles to to indicate that the debug process is active.
Useful debugger shortcuts
Action | Hotkey |
---|---|
Ctrl+F8 | |
F9 | |
F8 | |
F7 | |
Stop | Ctrl+F2 |
Ctrl+Shift+F8 | |
Debug code at caret | Shift+F9 (within the |
Last modified: 10 November 2021