Use the debugger
The source debugger provides a unified environment for debugging multiprocess and multithreaded debugging of programs that are written in C, C++, or Embedded C++. You can debug programs simultaneously on one or multiple remote target systems.
To use the Debug perspective, you must use executables that are compiled for debugging. These executables contain additional debug information that lets the debugger make direct associations between the source code and the binaries generated from that original source. In the IDE, you'll see different icons: an arrowhead icon for executables that weren't compiled for debugging, or a bug for those that were.
The IDE debugger uses GDB as the underlying debug engine. It translates each GUI action into a sequence of GDB commands, and then processes the output from GDB to show the current state of the program that it is debugging.
The IDE updates the views in the Debug perspective only when the program is suspended.
Editing your source after compiling causes the line numbering to be out of step because the debug information is tied directly to the source. Similarly, debugging an optimized binary can also cause unexpected jumps in the execution trace.
Last modified: 2013-12-21