Setting and Removing Breakpoints

Instead of stepping, you can set breakpoints to suspended the application at a certain point.

A breakpoint is set on an executable line of a program. If a breakpoint is enabled during debugging, the execution suspends before that line of code executes.

Add breakpoints

To add a breakpoint:

Disable breakpoints

You can disable a breakpoint or completely remove it. To disable a breakpoint, do one of the following:

Remove breakpoints

To completely remove the breakpoint, do one of the following:

Example

With the techniques described above:

  1. Set a line breakpoint on the code line printf( "a small %dst\n",i-3 );.

  2. Clear the FSS view.

  3. Restart your application.

    The application suspends when entering the main() function because this was defined in the Debug configuration.

  4. To resume execution, from the Debug menu, select Resume, or press F8, or click on the Resume button ().

    The application suspends execution, before this line is executed. The FSS view now shows:

    1
    2
    3
    Hello world, this is
  5. Resume execution again to finish execution.

    Note that though the application has finished execution, it has not been terminated yet. Your debug session is still active.