bugGNU Octave - Bugs: bug #37576, Make "dbstop if error"...


bug #37576: Make "dbstop if error" equivalent to debug_on_error(1) and debug_on_interrupt(1)

Submitted by:  Richard <crobar>
Submitted on:  Mon Oct 15 10:39:44 2012  
Category: InterpreterSeverity: 3 - Normal
Priority: 2Item Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Richard CrozierOpen/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


(Jump to the original submission Jump to the original submission)

Mon Feb 8 05:53:40 2016, comment #6:

This should be fixed by changeset


Lachlan Andrew <lachlan>
Project Member
Fri May 22 15:05:50 2015, comment #5:

Re-titled to reflect the true issue. Lowered the priority since there is an easy workaround.

Rik <rik5>
Project Administrator
Thu Nov 1 03:46:36 2012, comment #4:

I added seealso links between the debug_on_error function and the debug_on_warning and debug_on_interrupt functions. For the time being, I hope that will be enough to point people in the right direction.

Rik <rik5>
Project Administrator
Mon Oct 15 19:07:10 2012, comment #3:

For compatibility, I suppose we should consider making "dbstop if error" equivalent to setting both debug_on_error and debug_on_interrupt to true. I have to say that seems weird because Ctrl-C is not really an error. But whatever, we do a lot of other strange things in the name of compatibility.

John W. Eaton <jwe>
Project Administrator
Mon Oct 15 18:51:16 2012, comment #2:

I haven't tried, but I'm sure it will, sorry for the noise, I wasn't aware of this function.

Richard <crobar>
Mon Oct 15 18:48:45 2012, comment #1:

Octave also has a 'debug_on_interrupt' function. Does that work for you?

John W. Eaton <jwe>
Project Administrator
Mon Oct 15 10:39:44 2012, original submission:

In matlab, when you hit CTRL+C with the equivalent of debug_on_error set to true (in matlab this is set by "dbstop if error") matlab drops into debug mode at the currently executing line.

In contrast Octave simply quits execution of whatever is currently running and returns to the octave command prompt.

This functionality can be useful in various situation, e.g. locating endless loops in code which does not always exhibit the behaviour, and tracking down difficult to reproduce bugs, and examining the contents of variables when they occur.

Richard <crobar>


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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by lachlan (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by crobar (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Feb 16 02:02:17 2016rik5Open/ClosedOpen=>Closed
    Mon Feb 8 05:53:40 2016lachlanStatusNone=>Fixed
    Fri May 22 15:05:50 2015rik5SummaryHitting CTRL+C with debug_on_error(1) does not go into debug mode, does in ML=>Make "dbstop if error" equivalent to debug_on_error(1) and debug_on_interrupt(1)
    Fri May 22 15:05:49 2015rik5Priority5 - Normal=>2

    Back to the top

    Powered by Savane 3.1-cleanup1