Viewing Local Variables and Parameters in the Debugger
The Local Variables window enables you to monitor or detect changes to local variables and parameters used in your methods.
To display the Local Variables window if it is not already displayed
-
Select the View menu Local Variables command.
The Local Variables window automatically monitors all parameters and local variables in your methods. Use the Watches window to reduce the number of variables that are monitored.
The Local Variables window, shown in the following image, displays the values of all local variables in your methods. As your code executes, the values of the items change and the Local Variables window is updated.
For each local variable or parameter, the name. value, usage, and type of the item are displayed.
Local variable values are highlighted when they change.
By default, the variables
If the table is sorted, a numeric sorting indicator is displayed in the fixed cell of the column. If the column selected for sorting is not the identifier column, the identifier column is the second sort key.
You can inspect or modify variables selected in the Local Variables window. For details, see "Inspecting and Modifying Values", later in this chapter.

