Freigeben über


Seeing Stored Values

In the Debugger window, you can easily see the run-time values of variables, array elements, properties, and expressions in the following windows:

  • Locals Window
  • Watch Window
  • Trace Window

Seeing Stored Values in the Locals Window

The Locals window displays all the variables, arrays, objects, and object members that are visible in any program, procedure, or method on the call stack. By default, values for the currently executing program are displayed in the Locals window. You can see these values for other programs or procedures on the call stack by choosing the programs or procedures from the Locals For list.

You can drill down into arrays or objects by clicking the plus (+) beside the array or object name in the Locals and Watch windows. When you drill down, you can see the values of all the elements in the arrays and all the property settings in objects.

You can even change the values in variables, array elements, and properties in the Locals and Watch windows by selecting the variable, array element, or property, clicking in the Value column, and typing a new value.

Seeing Stored Values in the Watch Window

In the Watch box of the Watch window, type any valid Visual FoxPro expression and press ENTER. The value and type of the expression appears in the Watch window list.

Note   You can't enter expressions in the Watch window that create objects.

You can also select variables or expressions in the Trace window or other Debugger windows and drag them into the Watch window.

Values that have changed are displayed in red in the Watch window.

To remove an item from the Watch window list

Select the item and choose one of the following:

  • Press DEL.

    -or-

  • From the shortcut menu, choose Delete Watch.

To edit a watch

  • Double-click the watch in the Watch window and edit in place.

Seeing Stored Values in the Trace Window

Position the cursor over any variable, array element, or property in the Trace window to display its current value in a value tip.

A value tip in the Trace window

See Also

Suspending Program Execution | Output Display | Testing and Debugging Applications | The Logging of Code Coverage | The Handling of Run-Time Errors