help-octave
[Top][All Lists]
Advanced

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

Re: Step by step debug tool


From: David Bateman
Subject: Re: Step by step debug tool
Date: Sun, 25 May 2008 10:01:10 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20080306)

kruvalig wrote:
> Does exist step by step debug tool, like in matlab. Something like that: i  
> press F10 to execute line, and i can to see in command line value of  
> variables.

In 3.0.x the debug capability exists, though isn't completely matlab
compatible, in 3.1.x (ie the head of the repository) it has better
capability with matlab, but is still missing the dbmex function. For
3.0.x which I presume you're using, the commands you'll want to know are

dbstop <fcn> <line>  : Set a breakpoint in a function at a certain line
dbclear <fcn> <line> : Remove a breakpoint that has been set
keyboard : Insert in code at a point you want to enter debug mode
dbstatus : Return list of current breakpoints
dbwhere : Show where we are in the code
dbtype : List code near current breakpoint
dbstep : In 3.0.x this isn't quite the same as in matlab. The octave
dbstep command acts like the matlab "dbstep in" command. The Octave
command can only set line by line and not in multiples of lines
dbnext : The matlab equivalent of this "dbstep" or "dbstep 1".

You also have the debug_on_error, debug_on_warning and debug_on_interupt
commands that are useful for entering debug mode at useful points in the
code.



D.




reply via email to

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