View Variables in Other Scopes
Debugging Actions - Viewing the Variables in Other Scopes
The Watches window is most useful for native code (C, C++, VB) where it can be used to evaluate data items that are not available as Local Variables - data items with module or file scope and static Class member items.
You can also use the window to evaluate static Class member items in Java and .NET.
To use the Watches window, type the name of the variable to examine in the field in the window toolbar, and either press [Enter] or click on the Add new watched item icon.
To examine a static Class member variable in C++, Java or Microsoft .NET enter its fully qualified name. For example:
To examine a C++ data symbol with module or file scope, just enter its name. Note, items are evaluated only if the package in whose scope the item resides is currently loaded by the process being debugged. If the debugger is not running, no items are listed.
The names of the items to evaluate persist for the package and user ID, so the next time you debug the same project, the items evaluate automatically whenever a breakpoint occurs. They do not appear if another user debugs the same code.
If necessary, you can delete items using the Delete all watched items icon in the toolbar, or the right-click context menu options inside the window.