다음을 통해 공유


Variables Window (Windows Embedded CE 6.0)

1/5/2010

The Variables window provides quick access to variables that are important to the program's current context.

The following tabs appear in the Variables window.

  • Auto
    Displays information about variables from various statements of interest. These can include the current statement and other statements related to the current statement.Variables appear in alphabetical order. If a statement spans multiple lines, the Auto tab displays variables from the lines corresponding to that statement, up to a 10-line limit.
  • Locals
    Displays the names, values, and types of all local variables in the current function. As you trace through a program, new variables come into scope.
  • this
    Displays type, name, and value information about the object pointed to by the pointer, this. All base classes of the object are automatically expanded.

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

  • If a value appears in red, the value has recently changed. Only the last value to change appears in red.
  • You can right-click any tab to bring up a context menu of commands.
  • You can cut, copy, or drag information from the Variables window. You can edit the Value column to change the value of a variable while debugging.
    If you selected hexadecimal display, enter the value in hexadecimal or use the prefix 0n (zero-n) to indicate that the number is a decimal, such as 0n1000.
  • You cannot add variables or expressions to the Variables window, but you can change the value of an existing variable by double-clicking the associated Value field and entering new data.
  • You can also expand or collapse the list of displayed variables by using the tree controls.

You can expand an array, an object, or a structure variable in the Variables window if the variable has a plus (+) box in the Name field. If an array, object, or structure variable has a minus (–) box in the Name field, the variable is 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 declared as a C++ pointer to CObject points to a CComboBox, the Variables window recognizes this and adds an extra member so you can access the CComboBox members.

Ee480085.collapse(en-US,WinEmbedded.60).gifVariables Window Context Box

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 variables that are displayed.

You can hide the Context list by right-clicking in 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, this procedure displays the function's object code in the Disassembly window.

To autosize a column to fit its contents, double-click the vertical divider at the column edge. To size a column manually, drag the right divider to the left or right.

Rows are sized to fit the current font and cannot be resized manually.

Ee480085.collapse(en-US,WinEmbedded.60).gifContext Menu Options

Right-click the window to bring up a menu, which contains the following functions:

  • Toolbar
    Hides the Variables window toolbar.
  • Hexadecimal Display
    Changes the way integers are displayed: Turn this option on to display all integers, both signed and unsigned, in hexadecimal. Turn this option off to display all integers in decimal.
  • Docking View
    Switches the active window from docking to nondocking mode.

    • Docking mode. When a window is in docking mode, a check mark appears. You can dock the window to the border of the main Platform Builder window, or you can change the window to a floating window that can be moved outside the main Platform Builder window.
      To change the window to a floating window, hold the CTRL key and click on the frame of the window you select. This window can be redocked at any time.
    • Nondocking mode. If the window is in nondocking mode, it appears inside the main Platform Builder window only and cannot be docked.
  • Hide
    Hides the Variables window.

See Also

Tasks

Viewing a Variable in the Variables Window

Reference

Debug Windows
Variables Window: Program Variable Properties Dialog Box