|
From: | Richard Crozier |
Subject: | Re: Expected behaviour of dbtype |
Date: | Tue, 23 Feb 2016 14:36:56 +0000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
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 RANGESo 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.
Richard -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
[Prev in Thread] | Current Thread | [Next in Thread] |