Next Prev Up Top Contents Index

2.1 Entering the TTY debugger

The following is a simple example.

CL-USER 1 > (defun make-a-hippo (name weight)
              (if (numberp weight)
                  (make-animal 'hippo name weight)
                (error "Argument to make-a-hippo not a number")))
MAKE-A-HIPPO
 
CL-USER 2 > (make-a-hippo "Hilda" nil)
 
Error: Argument to make-a-hippo not a number
  1 (abort) return to level 0.
  2 return to top loop level 0.
  3 Destroy process.
 
Type :c followed by a number to proceed
CL-USER 3 : 1 >

The call to error causes entry into the debugger. The final prompt in the example contains a 1 to indicate that the top level of the debugger has been entered. The debugger can be entered recursively, and the prompt shows the current level. Once inside the debugger, you may use all the facilities available at the top-level in addition to the debugger commands.

The debugger may also be invoked by using the trace facility to force a break at entry to or exit from a particular function, or by a keyboard interrupt (generated by Ctrl+Break ).


LispWorks User Guide - 14 Dec 2001

Next Prev Up Top Contents Index