Inspecting variables

You can inspect variables in two ways: moving the mouse over the name of a variable in the Debug editor window (hovering) or by using the Variables view. With hovering, the debugger displays the value of a variable in a tree structure in a small window that disappears when you move the mouse away from the name of the variable. While the debugger displays the window, you can expand and collapse the tree structure to view more information. However, you can not edit the value of the variable. In the Variables view, the debugger displays the value of a variable in the Variables view and you can edit the value of the variable.

About this task

When a thread suspends, the top stack frame of the thread is automatically selected. When a stack frame is selected, the visible variables in that stack frame are displayed in the Variables view. Complex variables can be expanded to show the elements that make up the variable.

The Variables view displays all variables for a selected stack frame (when you are debugging C/C++, local variables (not global variables) are displayed - when you are debugging assembler, current line operands are displayed). To view and inspect one or multiple variables at a time, right-click the variable or variables and select Monitor Local Variable from the pop-up menu to work with the variables in the Monitors view.

Variable values can be changed in the Variables view by performing these steps:

  1. Right-click the variable that you want to edit and select Change Value from the pop-up menu.
  2. In the resulting dialog, change the variable value.
  3. Click OK.
  4. To indicate that the variable value has changed, its indicator will have a delta symbol next to it. All variables affected by the change will also have a delta symbol next to their indicators.

Feedback