The Variables window lists the local variables in the current stack frame. By default, the Variables window opens automatically whenever you start a debugging session. You can open the Variables window by choosing Window > Debugging > Variables.
If you open the Variables window when a debugging session is running, it closes automatically when you end the debugging session. If you open the window when no debugging session is running, it stays open until you close it.
The information given for each variable includes the variable name, type, and value. You can click the control to the left of the name to expand or collapse the variable. You can click the Value cell to edit the value directly in the Variables window.
In some cases, the debugger assigns a pound sign (#) and a number as the variable's value. This number is a unique identifier of the given instance. You can use this identifier to determine if a variable points to the same or to a different instance. You cannot edit this value.
The following table describes the icons displayed to the left of the object name in the Variables window.
Icon | Description |
---|---|
![]() |
Local variable |
![]() |
Container for a superclass |
![]() |
Static field of an object |
![]() |
Non-static field of an object |
The following table lists the actions you can perform using buttons in the Variables window
Button | Description |
---|---|
![]() |
Add and remove columns of information. |
![]() |
Switch the display from static local variables to auto local variables, and back. |
![]() |
Display evaluation results view within the Variables window instead of a separate window. |
![]() |
Display watches within the Variables window instead of a separate window. |
![]() |
Create a new watch. |
See Also | |
---|---|
Current Context in the Debugger C and C++ Debugging Tasks: Quick Reference C and C++ Variables and Expressions in the IDE C and C++ Debugger Windows |