Setting Watchpoints 

If you want to interrupt a program when the contents of a field or structure change, use a watchpoint. You can set up to five watchpoints, including watchpoints for strings.

A watchpoint may be either local or global: Local watchpoints are only valid in the specified program. Global watchpoints are valid in the specified program, and also in all other programs that it calls.

Procedure

To set a watchpoint, start the Debugger and proceed as follows:

  1. Choose Breakpoint ® Create watchpoint or the corresponding pushbutton.
    The Create Watchpoint dialog box appears:

  2. Decide whether you want to set a local or global watchpoint.
  3. Enter the name of the field for which you want to set the watchpoint.
  4. If you want your watchpoint to be activated each time the contents of the field change, the definition is now complete, and you can return to the Debugger by pressing ENTER . The watchpoint appears in the watchpoint display.
    If you want to specify conditions on which the watchpoint should be activated, continue with step 6.
  5. To create a conditional watchpoint, choose a relational operator. Valid operators:
  6. Operator

    Meaning

    = or EQ

    Equal

    <> or NE

    Not equal

    < or LT

    Less than

    <= or LE

    Less than or equal

    >= or GE

    Greater than or equal

    > or GT

    Greater than

     

  7. You can use the Comparison field option to specify whether the comparison should be with a value that you specify or with the contents of another field.
  8. Depending on your choice from step 6, enter a value or a field for the comparison.
  9. Choose ENTER to create the conditional watchpoint.