You copied the Doc URL to your clipboard.

Assigning conditions to an existing breakpoint

Using the options available on the Breakpoint Properties dialog, you can specify different conditions for a specific breakpoint.

For example, you can set a breakpoint to be applicable to only specific threads or processors, schedule to run a script when a selected breakpoint is triggered, delay hitting a breakpoint, or specify a conditional expression for a specific breakpoint.


  1. In the Breakpoints view, select the breakpoint that you want to modify and right-click to display the context menu.
  2. Select Properties... to display the Breakpoint Properties dialog box.

    Figure 4-6 Breakpoint Properties dialog

    Breakpoint Properties dialog

  3. Breakpoints apply to all threads by default, but you can modify the properties for a breakpoint to restrict it to a specific thread.
    1. Select the Break on Selected Threads option to view and select individual threads.
    2. Select the checkbox for each thread that you want to assign the breakpoint to.


      If you set a breakpoint for a specific thread, then any conditions you set for the breakpoint are checked only for that thread.
  4. If you want to set a conditional expression for a specific breakpoint, then:
    1. In the Stop Condition field, enter a C-style expression. For example, if your application has a variable x, then you can specify:x == 10
  5. If you want the debugger to delay hitting the breakpoint until a specific number of passes has occurred, then:
    1. In the Ignore Count field, enter the number of passes. For example, if you have a loop that performs 100 iterations, and you want a breakpoint in that loop to be hit after 50 passes, then enter 50.
  6. If you want to run a script when the selected breakpoint is triggered, then:
    1. In the On break, run script field, specify the script file.

      Click File System... to locate the file in an external directory from the workspace or click Workspace... to locate the file within the workspace.


      Take care with commands used in a script file that is attached to a breakpoint. For example, if the script file contains the quit command, the debugger disconnects from the target when the breakpoint is hit.
    2. Select Continue Execution if you want to enable the debugger to automatically continue running the application on completion of all the breakpoint actions. Alternatively, you can enter the continue command as the last command in a script file, that is attached to a breakpoint.
  7. Once you have selected the required options, click OK to save your changes.

Related information