help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave debugging (emacs)


From: forkandwait
Subject: Re: Octave debugging (emacs)
Date: Thu, 17 Jun 2010 15:41:04 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Jaroslav Hajek <highegg <at> gmail.com> writes:

> My usual method of debugging Octave is inserting custom debug
> statements straight into the code. With Octave, this is almost equally
> fast as visual debugging, because you don't need to neither explicitly
> recompile nor reload (cf. Python needs reloading).

I find the warning() function to be useful here.  If you use and ID, like
warning("mydebugid","var = %d", var) you can turn off the warnings when you are
finished.

I haven't found a simple way to print full matrices with the above, but I think
it is my laziness in reading the docs. 

> My general experience is that debuggers are only useful for the
> simplest kinds of errors. More complicated error conditions can't be
> discovered by simply *looking* at data, you need to *compute* to check
> (checksums, invariants, known equivalent expressions etc), and
> debuggers really don't help you at that.

I have come to like debuggers for twisty conditionals and loops, because you can
get and verify that the many moving pieces are doing what you think they are.  I
know it is best to avoid twisty stuff, but sometimes you can't help it.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]