Debug perspective controls

The Debug perspective contains many controls for tracing the program's execution and examining its state. Here, we summarize the controls shown in the default views of the perspective and provide the names of the C/C++ Development User Guide sections that explain them in full:
Tracing program execution
(Reference > Debug views > Debug view)
The Debug view displays the active debugging sessions and for each session, the hierarchy of program components, from the process level to the stack frames of individual threads. Clicking a program component updates the information shown in other views in the Debug perspective.
The buttons along the top support actions that include but aren't limited to:
  • Resume (Icon: Resume execution) — resume execution of the currently suspended program
  • Suspend (Icon: Suspend execution) — halt execution of the thread currently selected in the program listing
  • Terminate (Icon: Terminate execution) — end the selected debugging session and/or program; the impact of this action depends on what type of component is selected
  • Step Into (Icon: Step into) — execute the current line, including code inside of any routines, and proceed to the next statement
  • Step Over (Icon: Step over) — execute the current line, skipping execution inside of any routines
  • Step Return (Icon: Step return) — continue execution to the end of the current routine, then follow execution to the routine's caller
CAUTION:
It is not recommended to detach the debugger by clicking the Disconnect button (Icon: Severed Connection). This action sometimes causes the process to abruptly terminate with a nonzero exit code. For example, if you have a sleep() call, the process typically aborts when it reaches that line after you detached the debugger.
Accessing variables
(Tasks > Running and debugging projects > Debugging > Working with variables)
In the Variables view (shown in the upper right area), you can display and change variable values for the selected stack frame.
Managing breakpoints
(Tasks > Running and debugging projects > Debugging > Using breakpoints, watchpoints, and breakpoint actions)
You can add breakpoints through the editor, by double-clicking the left margin next to a line of code. When you do so, the new breakpoint appears in the Breakpoints view. This view lets you enable or disable breakpoints using checkboxes, and remove and skip them using the right-click menu.
Working with registers
(Tasks > Running and debugging projects > Debugging > Working with registers)
The Registers view displays the register contents for the selected stack frame, and lets you change their values.
Viewing loaded modules
(Reference > Debug views > Modules view)
The Modules view displays the executable and libraries loaded for the selected debugging session.

There are more debugging controls, which you can access by opening nondefault views; for instance, the Memory view lets you monitor and change process memory. To see the list of views applicable to debugging, select Window > Show View > Other > Debug. For general information on all debugging capabilities of the IDE, see the Tasks > Running and debugging projects > Debugging > Working with variables entry in the C/C++ Development User Guide.