I am trying to inspect the value of a variable at a determined breakpoint. Here is my simplified code:
(defun foo ()
(maplist (lambda (var)
(break)
var)
'(a b c)))
slime goes into debugger mode at this point. So I try to eval by pressing either the ":" or the "e" key and then I type "(car var)", but slime keeps on saying:
The variable VAR is unbound. [Condition of type UNBOUND-VARIABLE]
I am confused as to why it's saying this since "(break)" is within the anonymous function and within the scope of "var".
That works for me under CCL and CLisp. I think whether this works depends on your implementation, and maybe your OPTIMIZE
settings. You could try:
(declaim (optimize (debug 3)))
You'll have to recompile your code afterwards for it to take effect.
Or maybe, if your implementation supports interpretation, you could try that, since some implementations provide better debugging possibilities for interpreted than for compiled code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With