bugGNU Octave - Bugs: bug #60174, debug_on_interrupt broken since...


bug #60174: debug_on_interrupt broken since version 4.4

Submitted by:  Pantxo Diribarne <pantxo>
Submitted on:  Fri 05 Mar 2021 12:38:24 PM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  6.2.0 Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

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


( Jump to the original submission)

Sat 06 Mar 2021 08:12:30 PM UTC, comment #7: 

Broken on Windows is probably an artifact of the fact that Ctrl+C handling has always been difficult on Windows.

Rik <rik5>
Project Administrator
Sat 06 Mar 2021 12:56:46 PM UTC, comment #6: 

It doesn't work for me with Octave 4.2.2 on Windows 10. Maybe it was broken on that platform for a different reason.

Markus Mützel <mmuetzel>
Project Member
Fri 05 Mar 2021 06:59:40 PM UTC, comment #5: 

I bracketed the regression.  It works with octave-4.2.2 and fails with octave-4.4.1.

Rik <rik5>
Project Administrator
Fri 05 Mar 2021 05:23:05 PM UTC, comment #4: 

I went back to version 3.8.2 and it worked there.

Rik <rik5>
Project Administrator
Fri 05 Mar 2021 04:09:56 PM UTC, comment #3: 

I'm pretty sure this is a regression.  I think I remember having used this in my own code a long time ago.  But, maybe it was back in the 3.X series.

Rik <rik5>
Project Administrator
Fri 05 Mar 2021 04:09:22 PM UTC, comment #2: 

The idea is to enter the debugger at the next available point after the interrupt is noticed by the interpreter.  But I don't think it has worked properly for a long time, probably since we started throwing exceptions to interrupt the interpreter.

John W. Eaton <jwe>
Project Administrator
Fri 05 Mar 2021 03:32:34 PM UTC, comment #1: 

Same on Windows 10 with Octave 6.2.0, 5.2.0, 4.4.1, and 4.2.2.
No difference between GUI or CLI.

Either it doesn't work on that platform, or it doesn't work since a long time, or I don't understand what it should do.

Markus Mützel <mmuetzel>
Project Member
Fri 05 Mar 2021 12:38:24 PM UTC, original submission:  

I recently discovered the existence of debug_on_interrupt which I wanted to use as a way to interrupt temporarily a calculation and inspect variables before proceeding.

Unfortunately I was not able to have it work: whether debug_on_interrupt is true or false, Ctrl+C interrupts the script and returns to the prompt. For example I saved the following function in a file toto.m (which attached to this report), and then ran it but Ctrl+C interrupts it rather than leading to debug prompt.

function retval = toto (input1, input2)
  debug_on_interrupt (true, "local");
  while (true)
    a = 2;

Pantxo Diribarne <pantxo>
Project Member


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

Attach Files:

Attached Files
file #50992:  toto.m added by pantxo (127B - text/x-objcsrc)


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 jwe (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by pantxo (Submitted the item)

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

    Only project members can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-03-06 rik5 Summarydebug_on_interrupt does not change the effect of Ctrl+C => debug_on_interrupt broken since version 4.4
    2021-03-05 rik5 StatusNone => Confirmed
    2021-03-05 rik5 Item GroupIncorrect Result => Regression
    2021-03-05 mmuetzel Operating SystemGNU/Linux => Any
    2021-03-05 pantxo Attached File- => Added toto.m, #50992

    Back to the top

    Powered by Savane 3.6