Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is the octave debugger used?

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!

like image 384
big_mu5 Avatar asked Dec 03 '13 10:12

big_mu5


1 Answers

Take a look at the Debugging section of the Octave manual.

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.

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.

like image 74
carandraug Avatar answered Oct 28 '22 15:10

carandraug