Inspecting a variable in the lisp SLIME debugger
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.
链接地址: http://www.djcxy.com/p/55416.html上一篇: 了解应用程序是否需要管理员权限
下一篇: 检查lisp SLIME调试器中的变量