Debug perspective controls

Updated: May 06, 2022
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.
Note: The C/C++ Development User Guide is part of the Eclipse documentation, and is available in the QNX Momentics IDE help system. The online IDE or QNX SDP documentation doesn't include this programming guide, but you can access it on the Eclipse website at: https://help.eclipse.org/2018-12/topic/org.eclipse.cdt.doc.user/concepts/cdt_o_home.htm?cp=11.
Tracing program execution
(C/C++ Development User Guide > 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
(C/C++ Development User Guide > 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
(C/C++ Development User Guide > 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
(C/C++ Development User Guide > 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
(C/C++ Development User Guide > Reference > Debug views > Modules view)
The Modules view displays the executable and libraries loaded for a debugging session.

You can access more debugging controls through nondefault views; for instance, the Memory view lets you monitor and change process memory. For the list of debugging views, select Window > Show View > Other > Debug in the IDE. For general information on all debugging capabilities of the IDE, see C/C++ Development User Guide > Tasks > Running and debugging projects > Debugging.