Prev Next

View Variables in Other Scopes

Access

Ribbon

Execute > Windows > Watches

Other

Execution Analyzer window toolbar : | Watches

Views

View

Description

See also

Watches

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:

     CMyClass::MyStaticVar

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

     modulename!variable_name

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

History

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.