help-octave
[Top][All Lists]
Advanced

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

Re: Octave debugging (emacs)


From: Jaroslav Hajek
Subject: Re: Octave debugging (emacs)
Date: Thu, 17 Jun 2010 09:28:47 +0200

On Thu, Jun 17, 2010 at 12:12 AM, Johnny Carlsson <address@hidden> wrote:
> Hi all,
>
> I am using Octave 3.2.4, through Emacs 23.2.1, under Fedora 13 and am
> looking for efficient ways to debugging code. I have found the
> debug_on_interrupt et. al. functions, but I can't see how to use it
> efficiently (for now, I run Octave as an inferior Emacs process and issue
> debug commands for the script there before executing the script; ideally I'd
> like to see a simple method to set-view-remove breakpoints and watch
> variables). Thus, what are your experiences in debugging in Octave
> efficiently? Any recommendations on this would be highly appreciated! Also,
> any comments on Octave debugger and GUD are welcome (I have no experience
> with GUD, however it seems to be an effort directed at debugging within
> Emacs; is Octave compatible with GUD?)
>
> Thanks!
>
> Johnny
>

Octave provides the basic debugging support via dbstop, dbclear etc.
Visual debugging is typically handled by an IDE. Octave doesn't have a
"native" IDE, so you need to go elsewhere for that.

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).

On the contrary, it is a much more powerful approach, because it lets
you use plots, ifs, loads, saves etc as debug commands.

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.

-- 
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

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