Setting watchpoints

 

Watchpoints are set on a state variable in a stream element.

 

  1. In the editor area, open the file where you want to add the watchpoint.
  2. Directly to the left of the line where you want to add the watchpoint, select Add/Remove Watchpoint.  A watchpoint appears in the marker bar for the method that was selected.
  3. While the watchpoint is enabled, thread execution suspends when the field is accessed or modified.

 

Watchpoints can also be setup to break only on field modification or access.  In the Breakpoints view, select the watchpoint and toggle the Modification or Access item in its context menu.

 

Watchpoints can be removed, enabled, and disabled just like line breakpoints.

 

Related concepts

Breakpoints and watchpoints

General debugging support and Eclipse integration

 

Related tasks

Running and debugging

Breakpoints

Adding breakpoints

Removing breakpoints

Enabling and disabling breakpoints

Setting method breakpoints