next up previous
Next: Expressions Up: Examining a Program Previous: The Call Stack

Local Variables

The upper right corner of the program window shows the local and global variables of the method currently selected in the call stack. The current value of each variable appears to the right of its name.

The values of simple variables, with types like int, double, and char, are displayed to the right of the variable name. For arrays and structures, the memory location of the variable is shown and there is a disclosure square ( $\blacktriangleright$) to the left of the variable name. Click this button to see the components of the variable (array elements or structure fields). More complex data structures may contain fields that can be further expanded by clicking a disclosure square.



Note: Uninitialized variables may not appear.

To view the value of a variable in a separate window, double click its name or select View Variable from menu Data.

Other commands in menu Data control how information about variables is displayed.

Show Types displays the type of each variable along with its value.

View As... allows you to set the type according to which a variable is displayed. This is primarily useful for machine level debugging.

View Array displays an array in a separate window. Option-double-clicking a variable name is a shortcut for this command.

To change the value of a variable during debugging, double-click its current value and enter a new one.



Warning: This changes the value of the variable only for the current execution of the program. To make a permanent change, you must change the original program.


next up previous
Next: Expressions Up: Examining a Program Previous: The Call Stack
Kiri Wagstaff
2001-07-18