Previous Topic: Set a Hit CountNext Topic: Supported Conditions Statements on a Line Breakpoint


Set a Condition on a Line Breakpoint

You can set a condition on a breakpoint so that the breakpoint suspends program execution only when the condition is satisfied.

Follow these steps:

  1. Do one of the following steps:

    The Breakpoint Properties dialog appears.

    Breakpoint properties dialog

  2. Select Enable Conditional Breakpoint.

    The text field for Enable Conditional Breakpoint is enabled.

  3. Enter a boolean expression in the Enable Conditional Breakpoint field.
  4. Click one of the following Break When option buttons:
    Condition is true

    The breakpoint suspends program execution before the line of code containing the breakpoint is executed each time the condition evaluates to true.

    Value of condition changes

    The breakpoint suspends program execution only when the result of the condition changes.

  5. Click OK.

    The Diagram Trace Utility saves the changes and closes the dialog.

More information:

Expressions