bugGNU Octave - Bugs: bug #62895, Debug mode repeats the previous...

 
 

bug #62895: Debug mode repeats the previous command when pressing <Return>

Submitter:  None
Submitted:  Fri 12 Aug 2022 06:17:08 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  None Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 16 Aug 2022 04:11:51 AM UTC, comment #6: 

I like the auto-repeat feature.  When I hit a breakpoint or keyboard statement I then type "dbnext" and then <Return> to advance one line at a time through a piece of code.  It very much beats typing "dbnext<Return>" 20 times.

Rik <rik5>
Group administrator
Fri 12 Aug 2022 08:08:14 PM UTC, comment #5: 

oh, ok.  I never noticed that behavior in debug> before.  sure enough, in 6.4.0 debug repeats last command on enter, but it doesn't do that when you've entered debug> via keyboard. 7.2+ they now behave the same.

Nicholas Jankowski <nrjank>
Group Member
Fri 12 Aug 2022 08:04:04 PM UTC, comment #4: 

I expect any change was not intentional.  There may have previously been a difference between what happened with the keyboard command vs. entering the debugger.  Now keyboard is just another way to enter the debugger.

John W. Eaton <jwe>
Group administrator
Fri 12 Aug 2022 08:01:53 PM UTC, comment #3: 

sorry, crossed jwe's comment.

personally, i would recommend it be a default off option.  since in the debug state I may be deliberately changing/checking/testing values, i wouldn't want a stray <enter> to unexpectedly change things again.  in the example, had he written a+=1; there would have been no echo and values would have changed unexpectedly.

also, as a user visible change i didn't remember seeing something about this in the news. did i miss it? should probably be doc'd in the next release probably whether we change it or not.

Nicholas Jankowski <nrjank>
Group Member
Fri 12 Aug 2022 07:57:00 PM UTC, comment #2: 

confirmed on Octave 7.2.0 on windows GUI and CLI, and in a semi-recent 8.0.0 in linux (hg id 7d4cf04665e6).  unable to reproduce in Octave 6.4.0, either gui or cli.

Nicholas Jankowski <nrjank>
Group Member
Fri 12 Aug 2022 07:54:41 PM UTC, comment #1: 

Auto-repeating the previous command when in debug mode is a feature borrowed from gdb.  I find it useful to speed up stepping through code while debugging.

You can disable this feature by executing


auto_repeat_debug_command (false)


I suppose this feature could at least be disabled if Octave is started with the --traditional option.  Or maybe always disabled by default, but I would not like to see it removed.

John W. Eaton <jwe>
Group administrator
Fri 12 Aug 2022 06:17:08 PM UTC, original submission:  

Any command entered in keyboard mode is repeated when hitting enter. Was expecting no operation except to get a fresh "keyboard>" prompt.


>> keyboard
keyboard> a = 0
a = 0
keyboard> a += 1
a = 1
keyboard>
a = 2
keyboard>
a = 3
keyboard>
a = 4
keyboard>
a = 5


Anonymous

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  •  

    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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-08-16 rik5 CategoryNone Interpreter
        Item GroupNone Other
        Summarykeyboard mode repeats the previous command Debug mode repeats the previous command when pressing <Return>
    2022-08-12 jwe Item GroupRegression None
        StatusConfirmed None
    2022-08-12 nrjank Item GroupNone Regression
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code