A watch enables you to monitor the changing values of variables or expressions as your program runs. After you enter a watch expression, the Watch window displays the current value of the expression. As your program runs, the value of the watch changes as your program updates the values of the variables in the watch expression.
A watch evaluates an expression according to the current context which is controlled by the selection in the Stack window. If you move to a new context, the expression is reevaluated for the new context. If the execution point moves to a location where any of the variables in the watch expression are undefined, the entire watch expression becomes undefined. If the execution point returns to a location where the watch expression can be evaluated, the Watches window again displays the value of the watch expression.
To open the Watches window:
Or, add a watch in the following ways:
To edit a watch:
To delete a watch:
Caution: You cannot restore a deleted watch.
Using the Debugger Windows
Setting Preferences for the Debugger Windows
Examining Program State in Debugger Windows
Using the Stack Window
Copyright © 1997, 2004, Oracle. All rights reserved.