2.1 Starting up Lisp

2.1.2 Entering and exiting the Debugger

If Lisp reads an invalid form, encounters an interrupt, or for any reason cannot perform an evaluation, an error is signaled and the Debugger is entered. Upon entry, the Debugger prints a message that describes the error and provides options to continue the evaluation:

> test
>>Error: The symbol TEST has no global value.
SYMBOL-VALUE: 
   Required arg 0 (S): TEST
:C  0: Try evaluating TEST again
:A  1: Abort to Lisp Top Level
->  

The Debugger prompt (->) indicates that the Debugger is waiting for you to enter either a Debugger command or an expression to be evaluated. Any expression that can be typed at the top-level prompt can also be typed at the Debugger prompt. The manner in which the Debugger evaluates what it reads and displays a response is similar to the evaluation that occurs at the top level. If the Debugger encounters an error, you enter a lower level of the Debugger. When this happens, the Debugger again characterizes the error and displays an additional prompt:

 ->->
The number of consecutive Debugger prompts corresponds to the Debugger level to which you are typing.

The Debugger displays a list of commands for responding to the current error. The list varies depending on the type of error, but it always contains a command to return to the top-level prompt. You can exit the Debugger by entering this command at the Debugger prompt. In addition, you can always exit the Debugger by typing the command:a:t at the Debugger prompt. When you return to the top level, you can repeat the last evaluation by typing it in again, or you can continue entering new expressions to be evaluated.

See Chapter 3, "Debugging Lisp Programs" for a more detailed discussion of the Debugger.


The User's Guide - 9 SEP 1996

Generated with Harlequin WebMaker