Although you can debug a regular executable, you'll get much more information and control by building debug variants of the
executables. To build an executable with debugging information, you must pass the -g option to the compiler. If you're using a QNX Make project, the filename for the debug variant has _g appended to it.
To specify the -g option from the project options:
-
In the Project Explorer view, right-click the project and select Properties.
-
In the left pane, select QNX C/C++ Project.
-
In the right pane, select the Build Variants tab.
-
Under your selected build variants, make sure Debug is enabled:
-
Click Apply.
-
Click OK.
-
Rebuild your project (unless you're using the IDE's autobuild feature).