检查 lisp SLIME 调试器中的变量
我试图在确定的断点处检查变量的值。这是我的简化代码:
(defun foo ()
(maplist (lambda (var)
(break)
var)
'(a b c)))
slime 此时进入调试器模式。所以我尝试按“:”或“e”键进行评估,然后输入“(car var)”,但史莱姆一直说:
变量 VAR 未绑定。 [UNBOUND-VARIABLE 类型的条件]
我很困惑为什么这么说,因为“(break)”位于匿名函数内并且在“var”的范围内。
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".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这对我在 CCL 和 CLisp 下有效。我认为这是否有效取决于您的实现,也许还取决于您的 OPTIMIZE 设置。您可以尝试:
之后您必须重新编译代码才能生效。
或者,如果您的实现支持解释,您可以尝试这样做,因为某些实现为解释代码提供了比编译代码更好的调试可能性。
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: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.