3.3. Debug the application
Follow these steps to debug the "Hello world" application:
- Click Tools > Options.
- Select Debugger from the list.
- In the right pane, select the GDB tab.
- Add the following line to the Additional Startup Commands text box:
handle SIGILL pass nostop noprint
This keeps the the sigkill signal from causing the debugged application to finish on startup before reaching the main() loop.
This step is only required once. For subsequent debug sessions, skip this step and go directly to step 6.
- Click OK to save the changes and close the Options dialog.
- Double click the main.cpp file inside the sources folder of the project.
- Once the file opens, right-click the following line:
return app.exec();Select Set Breakpoint at Line 17 to add a breakpoint in the application before displaying the "Hello World" window:
![]()
- In the left vertical toolbar, click the Start Debugger button (green play icon with small bug) to start the debug session:
- The debug process starts and the session stops at the established breakpoint:
PDF
