Variables Tab

The Variables tab lets you evaluate variables in the project you are debugging. An evaluation is a one-time check of a value. If you want to track the changes in a value as the program progresses, use the Threads/Stack tab.

Evaluation History List
Scrolling list that shows the most recently evaluated variables and their values. The most recently evaluated variable is at the top of the list. Clicking the glyph expands an object or array to show all embedded variables. If the history list becomes too long, you can clear it out using the Clear List command.

Scope Information
Field that shows the scope in which the evaluate takes place. For example:

Scope: Class Main in file TestVarEval.java at line 120

means that the scope is a stack frame in the Main method in the file TestVarEval.java at line 120. If a thread is selected in the Threads/Stack tab, you will see a the scope information in the following form:

Scope: Class java.lang.Thread in thread AWT-Motif

A variable has a value when it is within the scope of the current location on the call stack. Global and static variables become active as soon as the program starts execution. Local variables become active when the method they are in is called and execution enters the scope of their declaration. A local variable remains active for as long as the containing method is on the stack and execution is within the scope of its declaration.

Evaluate Text Field and Button
Text field that accepts the variable you want to evaluate. Clicking the Evaluate button evaluates the variable in the text field and displays the results in the history list. If you do not know the name of the variable, try looking for the variable in the Threads/Stack tab or in the Source Editor.

Clear List Button
Command that removes all information in the Evaluation History list.


See also:

Evaluating Data Values
Threads/Stack Tab