8.5 Debugger commands
:v Debugger command
This command displays information about the current stack frame. For a call frame, the names and values of the function's arguments and local variables are given. If the value of an argument is not known, then the keyword :dont-know
is printed instead.
:error Debugger command
This command re-prints the message displayed upon entry to the current level of the debugger. This is typically an error message, and includes several continuation options.
:cc [variable] Debugger command
This command returns the current condition object which caused entry to this level of the debugger. If variable is supplied, the value of the condition object is bound to it.
:pp Debugger command
This command prints the source code for the current frame, if it is a call frame.
:all Debugger command
This command instructs the debugger to show all frames.
This command returns the lambda expression for an anonymous interpreted frame. If the expression is not known, then it is printed as the keyword :dont-know
.
:lf
Debugger command
This command looks in other packages to find functions or variables which have given rise to an undefined function or unbound variable error in the current package. For example:
CL-USER 16 > (defun foo () (print 'hi)) FOO CL-USER 17 > (in-package new) Error: "NEW" is not a package. 1 (continue) A new package named "NEW" is created. 2 (abort) return to level 0. 3 return to top loop level 0. Type :c followed by a number to proceed CL-USER 18 : 1 > :c #<PACKAGE NEW> NEW 19 > (foo) Error: the function FOO applied to arguments NIL is undefined. 1 (continue) Try calling FOO again 2 Return a value from the call to FOO 3 Try calling a different function instead of FOO with the same arguments 4 Set the symbol-function of FOO to another function 5 (abort) return to level 0. 6 return to top loop level 0. Type :c followed by a number to proceed NEW 20 : 1 > :c 3 type a form to be evaluated: 'user::foo COMMON-LISP-USER::HI COMMON-LISP-USER::HI NEW 21 >Using
:lf
, the latter part of the preceding interaction could have been:
NEW 21 > (foo) Error: the function FOO applied to arguments NIL is undefined. 1 (continue) Try calling FOO again 2 Return a value from the call to FOO 3 Try calling a different function instead of FOO with the same arguments 4 Set the symbol-function of FOO to another function 5 (abort) return to level 0. 6 return to top loop level 0. Type :c followed by a number to proceed NEW 22 : 1 > :lf Possible candidates are (COMMON-LISP-USER::FOO) COMMON-LISP-USER::FOO NEW 23 : 1 > :c 3 type a form to be evaluated: * COMMON-LISP-USER::HI COMMON-LISP-USER::HI NEW 24 >
Generated with Harlequin WebMaker