bugGNU Octave - Bugs: bug #38982, Debugger re-executes previous...

 
 

bug #38982: Debugger re-executes previous command when typing only carriage-return

Submitter:  Dan Sebald <sebald>
Submitted:  Tue 14 May 2013 03:43:27 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 14 May 2013 04:12:43 AM UTC, comment #2: 

OK, I can see that, at least in the case of "dbstep".  For other commands, I'm not sure repeating the previous is helpful for much.  Can you think of any?  Instead, it might be nicer to just map CR in debug mode to "dbstep".  For example, one could then do


debug>> dbstep
debug>>
debug>>
debug>> disp(x)
debug>>
debug>> disp(y)
debug>>


instead of having to type


debug>> dbstep
debug>>
debug>>
debug>> disp(x)
debug>> dbstep
debug>> disp(y)
debug>> dbstep


Also, if there is the repeat command feature, what are your thoughts about leaving debug-mode commands out of the command history?  It seems to me to be convenient to not have those commands in the history because when I'm done debugging chances are good I want to run the command again that triggers the breakpoint and do some more debugging after I've made changes I think will fix the problem.

I've argued in the past that any command that changes workspace memory should be in the command history, and I think that is a good argument.  But in the case of the debug repeat feature, we can't have a completely accurate representation of the history.  One can't tell if the user typed:


debug>> dbstep
debug>>
debug>>
debug>> x = 3;
debug>> dbstep


or


debug>> dbstep
debug>> x = 3;
debug>> dbstep


as an example.

Dan Sebald <sebald>
Tue 14 May 2013 03:49:09 AM UTC, comment #1: 

That behavior is intentional, and it is patterned after similar behavior in GDB.  It makes it easier to step through a function, because you don't have to keep typing or recalling the dbstep command (for example).


John W. Eaton <jwe>
Group administrator
Tue 14 May 2013 03:43:27 AM UTC, original submission:  

Inside the debugger, hitting carriage-return will re-run the previous command.  As an example, open uigetfile.m in the editor window and set a breakpoint at the first line inside the function, i.e.,


if (! __octave_link_enabled__ ())


then type "uigetfile" at the command line in the terminal window.

When the debugger breaks, type "disp(varargin)" at the command line.  I see:


debug> disp(varargin)
{}(0x0)


Now, type just a carriage return (no up arrow) a couple times.  I see:


debug> disp(varargin)
{}(0x0)
debug>
{}(0x0)
debug>
{}(0x0)


Dan Sebald <sebald>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by sebald (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-05-14 jwe StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code