bugGNU Octave - Bugs: bug #53064, "clear all" should not...


bug #53064: "clear all" should not clear breakpoints

Submitted by:  Avinoam Kalma <avinoam>
Submitted on:  Mon 05 Feb 2018 06:09:44 AM UTC  
Category: InterpreterSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: ConfirmedAssigned to: None
Originator Name: AvinoamOpen/Closed: Open
Release: devOperating System: Any

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sun 11 Feb 2018 10:11:58 PM UTC, comment #3:

It looks like it will be a little bit more difficult than just preventing their removal in the destructors. I applied the patch and then tried

The breakpoints are no longer visible to dbstatus, even if they haven't actually been removed.

Rik <rik5>
Project Administrator
Fri 09 Feb 2018 04:51:17 PM UTC, comment #2:

Currently, breakpoint lists are attached to the statement lists that are part of the octave_user_script and octave_user_function objects. The destructors for those classes clear the breakpoints.

It may be true that fixing this problem is as easy as the attached patch. But are the breakpoints restored properly when the function is loaded again? I haven't checked.

It may be time to take another look at the way breakpoints are handled. It seems to me that they should be stored external to the parse tree object instead of being attached to them, then used by the interpreter to decide when to stop.

(file #43215)

John W. Eaton <jwe>
Project Administrator
Fri 09 Feb 2018 04:33:50 PM UTC, comment #1:

Bah! I'm sure we added removing breakpoints to 'clear all' specifically because Matlab did it this way. And now we need to reverse and remove that functionality.

On the plus side, I don't think this is very hard. Somewhere in the 'clear all' implementation there is going to be a function call to clear all breakpoints. It should be as simple as removing one line of code, once it can be found.

Rik <rik5>
Project Administrator
Mon 05 Feb 2018 06:09:44 AM UTC, original submission:

Since Matlab 2015b, "clear all" does not clear breakpoints
see: https://www.mathworks.com/help/matlab/release-notes.html#busa1h6-21

"dbclear all" should be used to clear all breakpoints

Avinoam Kalma <avinoam>
Project Member


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

Attach File(s):

Attached Files
file #43215:  diffs.txt added by jwe (706B - text/plain)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by jwe (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by avinoam (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 09 Feb 2018 04:51:17 PM UTCjweAttached File-=>Added diffs.txt, #43215
    Fri 09 Feb 2018 04:33:50 PM UTCrik5StatusNone=>Confirmed

    Back to the top

    Powered by Savane 3.1-cleanup1