Show Contents

# 3.3. Debug the application

Follow these steps to debug the "Hello world" application:

1. Click Tools > Options.

2. Select Debugger from the list.

3. In the right pane, select the GDB tab.

4. 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.

5. Click OK to save the changes and close the Options dialog.

6. Double click the main.cpp file inside the sources folder of the project.

7. 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:

8. In the left vertical toolbar, click the Start Debugger button (green play icon with small bug) to start the debug session:

9. The debug process starts and the session stops at the established breakpoint:

© 2018 Digi International Inc. All rights reserved.
3.3. Debug the application updated on 30 January 2018 09:32:17 AM