About Debugging Tools (Visual LISP IDE)

Debugging is usually the most time-consuming stage in the development of any program.

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

For this reason, Visual LISP includes a powerful debugger that provides the following features:

Visual LISP provides the following facilities to implement these features:

Break Loop Mode
Halts program execution at specified points, allowing you to look at and modify the value of objects during the break. Examples of AutoLISP objects are variables, symbols, functions, and expressions.
Stop Once

Causes Visual LISP to break unconditionally when it evaluates the very first AutoLISP expression encountered.

Break on Error

Automatically activates the interactive break loop whenever your program encounters a runtime error.

Note that if this option is enabled, some errors that result from function calls entered at the AutoCAD Command prompt will cause Visual LISP to get focus. That is, the active window may switch from AutoCAD to the Visual LISP Console window, where you will be in a break loop.

Break on Function Entry

Sets the Debug-on-Entry flag for a function's name symbol, causing a break to occur every time you invoke that function. At the break, the source code for the function will be shown in a special window. You can set or clear the Debug-on-Entry flag interactively with the Symbol Service dialog box.

Top-Level Debugging Mode

Controls the loading of a program from a file or an editor window. If enabled, breaks occur before evaluating every top-level expression (such as defun).

If Top-Level debugging and Stop Once mode are enabled, Visual LISP will enter the debugging mode every time you load a file because Visual LISP is debugging defun, setq, and other functions defined within the file as they are loaded. This is usually not a helpful debugging technique and should only be required in rare instances.

Inspect Window

Provides detailed information on an object in an Inspect dialog box. If the object being inspected is composed of nested objects (a list, for example), the Inspect feature allows you to inspect all the components, each one listed on its own line within the window. You can also recursively inspect any nested object until an atomic object (such as a number or a symbol) is reached.

Watch Window

Watches the values of variables during program execution. The content of the Watch window is updated automatically. This means that if the value of a variable placed in the Watch window is changed, this change will automatically be reflected in the Watch window.

Trace Stack Facility

Views the function call stack. The call stack is a mechanism by which Visual LISP records the sequence of functions as they are executed by your program. You can view the stack during a debugging session (when the program is in a suspended state, such as stepping through after a breakpoint), or after your program has crashed. If viewed after your program crashes, the function call stack shows what Visual LISP was doing at the moment the program failed.

Trace Facility

A standard LISP facility, logs the calls and return values of traced functions into the special Trace window.