Watching the Value of a Variable or Expression

You can watch the value of a variable while debugging your program by adding its name to the Watches tab of the Debugger window. If you are running the JPDA, you can also watch the value of an expression.

To watch a variable or expression:

  1. From the main window, choose Debug and choose Add Watch (Shift-F8).
  2. In the Add Watch dialog box, type the variable or expression to watch.
  3. Click OK.
  4. To view the value of the variable or expression, open the Watches tab of the Debugger and select the item.
Tip You can also set a watch by selecting the variable or expression directly in the Source Editor, right-clicking, and choosing Add Watch or by right-clicking the Watches node in the Debugger window.
See also
Creating a Fixed Watch
Viewing Variables in the Current Context

Legal Notices