To Monitor Variables during Program Execution with the Watch Window (Visual LISP IDE)

Viewing the value of a variable at run-time can be useful in debugging an issue with a program.

Note: The Visual LISP IDE is available on Windows only.

When not using Visual LISP, you can use the princ function to display the current value of a variable during the execution of a program.

Display the Watch window

Add a variable to the Watch window

  1. In Visual LISP, text editor window, double-click or select a variable name.
  2. Right-click and click Add Watch.

    Visual LISP passes the variable’s name to the Watch window and displays its current value.

    Note: If the Watch window is not already open and you want to view a variable's value, you can open the window by clicking View Watch Window from the Visual LISP menu bar.

    If you click the Add Watch button from the Watch window without selecting a variable name from the text editor window first, the following window appears:

Remove a variable from the Watch window

  1. In the Watch window, select the variable to remove and right-click.

    If the Watch window is not displayed, click View Watch Window.

  2. Click Remove from Watch.

View the return value of the last evaluated expression