The Local Variables View
The Local Variables view displays all the arguments and local variables associated with the selected frame in the Call Stack.
NOTE: Global variables are not displayed in the Local Variables view. To view them, add them to the Data View. See
Entering a New Expression into the Data View.
The
Local Variable’s default three columns display each variable’s
Name,
Type and
Value at the time that the thread stopped. (You can customize the visible columns in the view, turning on Thread ID and Address, similar to the Data View. See
Customizing the Data View for more information.)
For example, in
Figure 49, for selected function
snore, the local variables display under the associated scope or
program block.
You can expand and collapse the list of variables in a block by clicking the left arrow next to it in the Local Variables pane:
Displaying information in tooltips:
Placing your cursor over a variable displays its value in a tooltip:
Hovering your cursor over a block displays the file and function in which it appears:
Viewing complex variable structures:
Select the
right arrow to display the substructures in a complex variable.
Note that you can also dive on a complex variable that you have copied to the Data View. See
Entering a New Expression into the Data View.
Editing the value of a variable:
If your data’s value is not what you expect, you can change a variable’s value to test a fix. The new value changes the source code for that session only.
Double-click on the value in the Value column and enter a new value.
For example, this edit changes the value of
me from 1 to 2:
Copy a variable definition from the TotalView UI to another document by right-clicking on the variable and selecting
Copy.
TotalView copies the variable as a tab-separated string so that pasting it into another program results in columns of data delineated by a tab.