Book a Demo
Prev Next

View Variables in Other Scopes



Execute > Windows > Watches


Execution Analyzer window toolbar : Analyzer Windows icon| Watches




See also


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 add a watch, type the name of the variable to watch in the toolbar, and press the Enter key.

To examine a static Class member variable in C++, Java or Microsoft .NET, enter its fully qualified name:


To examine a C++ data symbol with module or file scope, just enter its name.

Variables are evaluated by looking at the current scope; that is, the module of the current stack frame (you can change the scope at a breakpoint by double-clicking the frame in the Call Stack).

If the global variable exists in a different module, you can examine the variable by prefixing the module name to the variable


It is quite easy to mistype data item names, so if you make or find an error, highlight the string, press F2 and retype the text. This also speeds up the resolution of named items in the debugger, by breaking a search when matching item are discovered.

View Elements of Array View the Local Variables View Debug Variables in Code Editors Inspect Process Memory


The history of items entered is maintained. Previously entered names or expressions can be selected again using the Up arrow key and Down arrow key inside the toolbar text box. The history will also persist for the user across any instance of Enterprise Architect or model on the same machine.