How do you find where an error has occurred in MIT scheme?

。_饼干妹妹 提交于 2019-12-11 06:16:21

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/26947085/how-do-you-find-where-an-error-has-occurred-in-mit-scheme

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!