八度调试器如何使用? [英] How is the octave debugger used?
问题描述
因此,我尝试使用倍频程调试器来检测零除的位置。为此,使用 debug_on_warning()似乎合乎逻辑。但是,我只是不了解如何使用此函数调用。
我的意思是应该将其放在脚本中的某个地方吗?但是调试器将如何启动?
一个例子会很棒!
So I'm trying to use the octave debugger to detect where division by zero happens. For that it seems logical to use "debug_on_warning ()". However I'm just not understanding how to use this function call. I mean should I place it in the script somewhere? but then how would the debugger start? an example would be great!
推荐答案
看看 Octave手册的调试部分。
在这种情况下,应将 debug_on_warning(1)
放在脚本的顶部,这样在警告发生时它会停止并进入调试模式。然后键入 dbwhere
找出您所在的位置。
For your case, you should place debug_on_warning (1)
at the top of your script so it stops when the warning happens and drops you in debug mode. Then type dbwhere
to find out where you are.
另一种方法就是我这样做,离开在您认为可能存在问题的某些区域中,命令键盘
。然后使用 dbstep
逐行评估脚本。
An alternative, that's the way I do it, leave the command keyboard
in certain areas where you think the problem may be. Then use dbstep
to evaluate your script line by line.
这篇关于八度调试器如何使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!