Checking a variable in the lisp SLIME debugger

I am trying to check the value of a variable at a specific breakpoint. Here is my simplified code:

(defun foo () (maplist (lambda (var) (break) var) '(abc))) 

slime goes into debug mode at this point. Therefore, I am trying to determine by pressing either the ":" or "e" key, and then enter "(car var)", but the slime continues to say:

The variable VAR is unbound. [UNBOUND-VARIABLE type condition]

I am confused why he talks about this, since "(break)" is within the anonymous function and within the "var" framework.

+7
source share
1 answer

This works for me under CCL and CLisp. I think whether this will work depends on your implementation and, possibly, your OPTIMIZE settings. You can try:

 (declaim (optimize (debug 3))) 

After that, you will have to recompile your code for it to take effect.

Or maybe if your implementation supports interpretation, you can try this because some implementations provide better debugging options for interpreted ones than for compiled code.

+4
source

All Articles