Viewing Variables for an Application (Windows CE 5.0)

Send Feedback

The Variables window provides quick access to variables that are important in the current context of the application.

The window includes three tabs:

  • The Auto tab displays the variables that are used in the current statement and in the previous statement.
  • The Locals tab displays the variables that are local to the current function.
  • The This tab displays the object that is pointed to by this.

Each tab contains a spreadsheet with fields for the variable name and value. The debugger fills in these fields.

If a value appears in red, it indicates that the value has recently changed. Only the last value to change appears in red.

You cannot add variables or expressions to the Variables window. You must use the Watch window. However, you can change the value of a variable by left-clicking its Value field and entering new data.

You can also expand or collapse the variables that are shown by using the tree controls.

If an array, object, or structure variable in the Variables window has a plus (+) box in the Name field, you can expand it.

If an array, object, or structure variable has a minus (–) box in the Name field, the variable is already fully expanded.

If the variable is an object, a reference, or a C++ pointer to an object, the Variables window expands the variable to show the most important data at the top level.

If the variable is a reference or a C++ pointer to an object, the Variables window downcasts the reference or pointer.

The Variables window adds an extra member to the expanded object. This extra member, which looks like another base class, indicates the derived subclass.

For example, if a variable that is declared as a C++ pointer to CObject really points to a CComboBox, the Variables window recognizes this and adds an extra member so you can access the CComboBox members.

In addition to tabs, the Variables window has a context box on the toolbar that contains a copy of the current call stack in a drop-down list box. Use this list to specify the current scope of the variables that are displayed.

You can hide the Context list by right-clicking the Variables window and then clearing the Toolbar check box.

You can navigate to a function's source code or disassembled object code from the Context list. This procedure displays the function's source code, if available, in a source window. If source code for the selected function is not available, it displays the function's object code in the Disassembly window.

This procedure changes how the view of the program is displayed in the Variables window and other debugger windows, but does not change the next line of execution nor the value that is stored in the program counter.

See Also

Viewing Debug Information | Viewing a Variable in the Variables Window

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.