3 Debugging Lisp Programs

3.1 About the Debugger

The Debugger is a programming tool that allows you to examine and modify Lisp programs and foreign functions while they are running. In the Debugger you can examine the Lisp control stack, examine and modify local variables, and evaluate new Lisp expressions while your program is still being executed. You can enter the Debugger and return to the Lisp top level at any time.

The Debugger is entered when an error is signaled that is not handled by any error-handling code. You can also explicitly enter the Debugger by calling the Common Lisp functionserror,cerror, orbreak, by calling the extensioninvoke-debugger, or by typing the keyboard interrupt character that has been defined for your system.

When you enter the Debugger, a message is displayed that describes the kind of condition that has been signaled and the options that you can use to proceed. You can continue the current evaluation, return to a previous evaluation, enter new forms to be evaluated, or return to the top level of Lisp.

If a new error is signaled while you are evaluating forms in the Debugger, you enter the Debugger again. Each time you enter a recursive Debugger level, you are given information about the current condition and about the available options to proceed.

This chapter describes the Debugger in detail and gives examples of how you can use Debugger commands to examine and modify your programs. If you are new to Lisp, you should read the entire chapter and try entering some of the examples.

3.1.1 - The Debugger evaluation environment
3.1.2 - The Lisp stack
3.1.3 - Using the debugging tools

The User's Guide - 9 SEP 1996

Generated with Harlequin WebMaker