# Evaluating Expressions

An evaluation tells the value of the expression/variable at the current time. You can evaluate local or global variables within the scope of the method you are stopped in. You can also expand objects and arrays to show all embedded variables.

You can evaluate expressions in the source code that you are debugging, with any of the following methods:

- Use the Expression Evaluation window to check the value of an expression and view the results in the Debug tab below the source editor window.
  Choose Debug -> Evaluate to display the Expression Evaluation window.
- Use the Evaluate button to display a one-time check of a value.
  Select the expression you want to evaluate, and click the Evaluate button on the Edit/Debug toolbar. The Debug tab below the source editor window displays the results.
- Use the Threads/Stack window to track the changes of a value as the program progresses.
  Choose Debug -> Threads/Stack to display this window.
- Use the Breakpoints window to stop when a specified expression is true.
  Choose Debug -> Breakpoints to display the Breakpoints window; then click Show Advanced.

## Evaluation History

When you use either the Expression Evaluation window or the Evaluate button, the Debug tab shows the most recently evaluated expressions and their values. The most recently evaluated expression is at the bottom of the list. If the history list becomes too long, you can clear it out by selecting the expressions and pressing the Delete key.

See also:

  Evaluating Data Values