On 23/02/16 14:16, John W.
Eaton wrote:
On 02/23/2016
08:35 AM, Richard Crozier wrote:
Hello,
The help for dbtype states:
"When called with no arguments in debugging mode, display
the script
file currently being debugged."
From this I expected that dbtype would print the function
currently
stopped in the stack. So for instance, if I'm stopped in a
function foo
which is called by a function bar, and I navigate up to bar
by doing
dbup, I would have expected that dbtype would now print out
bar.
However, as far as I can tell, it still prints out foo no
matter where I
navigate too.
Is this the expected behaviour of dbtype, or a bug?
Sounds like a bug to me but I don't know what Matlab does.
jwe
Matlab's dbtype doesn't work in the same way, you must supply
the function name. It only supports the following syntax:
dbtype FILESPEC
dbtype FILESPEC RANGE
So it's really your choice on how you want it work in Octave in
the debugging case. Octave's feature for printing out lines from
the current file you're debugging is a nice improvement over
Matlab, but it would be even more useful if it printed out the
function you've actually navigated to in the function stack.
I've only actually tried this when stopped at an error so I
don't know if the behaviour is different if stopped at a break
point.