Viewing the value of a variable at run-time can be useful in debugging an issue with a program.
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.
Visual LISP passes the variable’s name to the Watch window and displays its current value.
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:
If the Watch window is not displayed, click View Watch Window.
Visual LISP displays the Watch window, which shows the value of the *LAST-VALUE* IDE global variable. Visual LISP always stores the value of the last evaluated expression in the *LAST-VALUE* variable.