Setting a watchpoint

  1. In the source view, select a variable to create the watchpoint.
  2. Right-click and select Condition Watchpoint or Modification Watchpoint. The Watchpoint dialog box is displayed.
    Note: For local variables, you can add the function name in which the variable is defined in the Function field. This ensures that the debugger only stops at the variable within that specific function, because the function name and the variable name are concatenated.
  3. For a condition watchpoint, specify the value to suspend on. You can initially disable this watchpoint if required.

    Additional considerations for condition watchpoints include:

    • String values containing alpha characters must be enclosed in quotation marks.
    • Fixed variables may require spaces to fill the domain.
    • If the variable is global or external, the function name must not be specified.
    • If the variable is declared within a function and the same variable name does not exist as a global variable, it is not required to add the function name.
    • The total length of function name and variable name should be less than 255 bytes.
    • Condition watchpoints extend modification watchpoints; the debugger stops only if the variable value changes and meets the specified value.
    • Condition watchpoints are currently not supported for array elements, such as var(1,2).
  4. Click OK.