Watches are useful when you need to monitor or detect changes to parameters and local variables used in your methods. The Watches window displays the values of items that are being watched.
As your code executes, the values of the items change, and the Watches window is updated.
To display the Watches window if it is not already displayed
Select the View menu Watches command.
The following image shows an example of the Watches window.
For each item being watched, the name and value of the item are displayed. The value that is displayed is:
The current value of the item, if the item is a primitive type
An oid, if the item contains an object reference
<null>, if the variable has no value assigned to it
[Out of scope], if the item is not within the scope of the method currently selected in the Call Stack window or it is declared but not used in the method currently selected in the Call Stack window
Values being watched are highlighted when they change.
Position the cursor over an object or variable in a line of code in the Method Source window to display the current value of that item in bubble help. (For details about the circumstances under which bubble help is displayed by default, see "Displaying Code in the Method Source Window", earlier in this chapter.)