[英]How to turn off the debugger in MIT Scheme
MIT Scheme's REPL automatically starts the interactive debugger when there is an error: MIT Scheme 的 REPL 在出现错误时自动启动交互式调试器:
1 ]=> foobar
;Unbound variable: foobar
;To continue, call RESTART with an option number:
; (RESTART 3) => Specify a value to use instead of foobar.
; (RESTART 2) => Define foobar to a given value.
; (RESTART 1) => Return to read-eval-print level 1.
2 error>
How do I turn off the debugger?如何关闭调试器? All I want to see is the error message (eg
;Unbound variable: foobar
) without entering the debugger.我只想在不进入调试器的情况下看到错误消息(例如
;Unbound variable: foobar
)。 In other words, I want to return to read-eval-print level 1 automatically whenever there is an error.换句话说,我想在出现错误时自动返回到 read-eval-print level 1。
MIT Scheme version: 10.1.10 MIT 方案版本:10.1.10
MIT Scheme's interactive debugger can be turned off by running:可以通过运行以下命令关闭 MIT Scheme 的交互式调试器:
(set! standard-error-hook
(lambda (condition)
(display (condition/report-string condition))
(abort)))
To make the change persistent across REPL sessions, add the lines above to your MIT Scheme initialization file ( ~/.scheme.init
on UNIX-like systems).要使更改在 REPL 会话中持久存在,请将上面的行添加到 MIT Scheme 初始化文件(类 UNIX 系统上的
~/.scheme.init
)。
When there is an error in the REPL, the interactive debugger will no longer appear:当 REPL 出现错误时,交互式调试器将不再出现:
1 ]=> foobar
Unbound variable: foobar
;Abort!
1 ]=>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.