Adding watchpoints

A watchpoint is a special breakpoint that stops the execution of an application whenever the value of a given expression changes, without specifying where this may happen. Unlike breakpoints which are line-specific watchpoints are associated with files. They take effect whenever a specified condition is true regardless of when or where it occurred. To set a watchpoint on a global variable highlight the variable in the editor or select it in the outline view.

To set a watchpoint on a global variable:

  1. Highlight the variable in the editor or select it in the outline view.
  2. Click Run > Toggle Watchpoint.
  3. Do any of the following:
  4. The watchpoint appears in the Breakpoints view list.

Related concepts
C/C++ Development perspective

Related tasks
Working with breakpoints and watchpoints

Related reference
Run and Debug dialog box

IBM Copyright Statement