octave-maintainers
[Top][All Lists]
Advanced

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

Is a debug "silent" option desirable?


From: Daniel J Sebald
Subject: Is a debug "silent" option desirable?
Date: Mon, 26 Aug 2013 14:35:31 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

I don't see any type of option for controlling the text that is displayed by dbstep (either as an option to dbstep() or via separate function such as dbopt()). With the GUI and its markers and hot-keys in the editor, the verbose text in the command window, such as:

test importdata
stopped in /usr/local/src/octave/octave/build-gui-12/../octave/scripts/testfun/assert.m at line 102
102:     if (ischar (expected))
debug>
stopped in /usr/local/src/octave/octave/build-gui-12/../octave/scripts/testfun/assert.m at line 120
120:     elseif (iscell (expected))
debug>
stopped in /usr/local/src/octave/octave/build-gui-12/../octave/scripts/testfun/assert.m at line 146
146:     elseif (isstruct (expected))
debug>
etc.

seems sort of redundant. There is this function "dbwhere" which creates the same text as above. If in debug mode the text is always displayed at the command line, the function "dbwhere" probably doesn't find much use. Also, wasn't it on the Octave list where there was discussion of a debug feature that allowed showing more lines of text around the current position in the file? With that feature, and not having the GUI, the user could probably use the command line interface without requiring the line of code be displayed with each "dbstep".

So, the question is whether there are some users who would prefer the debug mode not be so verbose. The above might look like:

test importdata
stopped in /usr/local/src/octave/octave/build-gui-12/../octave/scripts/testfun/assert.m at line 102
102:     if (ischar (expected))
debug> dbstep
debug> dbstep
debug> dbstep
etc.


Or not even advance the command line:

test importdata
stopped in /usr/local/src/octave/octave/build-gui-12/../octave/scripts/testfun/assert.m at line 102
102:     if (ischar (expected))
debug>


It depends if one's viewpoint is that debugging is the equivalent of commands and the philosophy that all commands should be displayed as a historical trace of operations, or debugging is simply a mode of operation.

Dan


reply via email to

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