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")))
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
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.
The debugger can also be entered by a keyboard interrupt. Keyboard interrupts are generated by
on Windows and
on Motif (there's no corresponding gesture on Mac OS X).