Adding watchpoints

Note: Watchpoints are allowed only on global variables.
To add a watchpoint:
  1. Right-click on the global variable in the Variables view and select Add Watchpoint (C/C++).

  2. Enter an expression in the field. When a variable is highlighted in the view, it will be automatically added to the field in this dialog.
    The expression may be anything that can be evaluated inside an if statement (e.g. y==1).
  3. To stop the program when it reads the watch expression, select Read; to stop the program when it writes the expression, select Write.
  4. Click OK. The watchpoint is highlighted in the Breakpoints view list.