您如何找到MIT方案中发生错误的地方? [英] How do you find where an error has occurred in MIT scheme?

查看:108
本文介绍了您如何找到MIT方案中发生错误的地方?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您在MIT方案中遇到错误时,它不会告诉您错误发生在哪里.例如,它只打印以下内容:

When you get an error in MIT scheme it doesn't tell you where the error occurred. For example, it just prints something like this:

;Unbound variable: top-left
;To continue, call RESTART with an option number:
; (RESTART 3) => Specify a value to use instead of top-left.
; (RESTART 2) => Define top-left to a given value.
; (RESTART 1) => Return to read-eval-print level 1.

如何找到我的代码中发生此错误的位置?

How do I find where this error occurred in my code?

推荐答案

在mit-scheme中,如果您从外壳程序使用REPL,则可以调用 Edwin调试. 如果这是您想要的,任何一个都不会告诉您错误发生在文件中的代码行.但是他们提供了大量的信息,并提供了解决问题的设施.这两个链接都指向文档,并很好地说明了如何使用它们.

In mit-scheme, if you are using the REPL from a shell, you can call debug to get the debugger. If you are using the edwin editor. It comes with it's own debugger. Edwin debug. Neither will tell you the line of code in a file where the error occurred if that is what you want. But they provide plenty of information, and facilities to find the problem. Both links are to the Documentation with a good explanation on how to use them.

这篇关于您如何找到MIT方案中发生错误的地方?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆