The locals window displays a list of all variables that are in scope of the selected stack frame in the Call Stack.
Locals window user interface
The Locals window is divided into a tool bar and the main data display.
Locals tool bar
Button | Description |
![]() |
Displays the selected item in binary. |
![]() |
Displays the selected item in octal. |
![]() |
Displays the selected item in decimal. |
![]() |
Displays the selected item in hexadecimal. |
![]() |
Displays the selected item as a signed decimal. |
![]() |
Displays the selected item as a character or Unicode character. |
![]() |
Sets the displayed range in the active memory window to the where the selected item is stored. |
![]() |
Sorts the local variables alphabetically by name. |
![]() |
Sorts the local variables numerically by address or register number (default). |
Using the Locals window
The Locals window shows the local variables of the active function when the debugger is stopped. The contents of the Locals window changes when you use the Debug Location tool bar items or select a new frame in the Call Stack window. When the program stops at a breakpoint or is stepped, the Locals window automatically updates to show the active stack frame. Items that have changed since they that were previously displayed are highlighted in red.
Showing the Locals window
To display the Locals window if it is hidden, do one of the following:
- From the View menu, click Other Windows then Locals.
—or—
- From the Debug menu, click Debug Windows then Locals.
—or—
- Type Ctrl+Alt+L.
—or—
- Right click the tool bar area to display the View menu.
- From the popup menu, click Other Windows then Locals.
Changing display format
When you select a variable in the main part of the display, the display format button highlighted on the Locals window tool bar changes to show the item’s display format.
To change the display format of a local variable, do one of the following:
- Right click the item to change.
- From the popup menu, select the format to display the item in.
—or—
- Click the item to change.
- On the Locals window tool bar, select the format to display the item in.
Modifying local variable values
To modify the value of a local variable, do one of the following:
- Click the value of the local variable to modify.
- Enter the new value for the local variable. Prefix hexadecimal numbers with ‘0x’, binary numbers with ‘0b’, and octal numbers with ‘0’.
—or—
- Right click the value of the local variable to modify.
- From the popup menu, select one of the operations to modify the local variable value.