bugGNU Octave - Bugs: bug #49068, Cannot set breakpoints in...

 
 

bug #49068: Cannot set breakpoints in subfunctions from GUI editor when not using "endfunction" keyword

Submitted by:  Guillaume <gyom>
Submitted on:  Mon 12 Sep 2016 12:39:46 PM UTC  
 
Category: GUISeverity: 2 - Minor
Priority: 5 - NormalItem Group: Incorrect Result
Status: ConfirmedAssigned to: None
Originator Name: GuillaumeOpen/Closed: Open
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 13 Sep 2016 10:17:18 AM UTC, comment #5:

Setting a breakpoint from the command line indeed works fine, thanks for pointing it out. It seems necessary to specify the name of the subfunction though: ie it works with "dbstop test_breakpoint>bbbb 8" but not with "dbstop test_breakpoint 8".

Also, I cannot back it up by any number but I would guess that the majority of Matlab code around doesn't have an "end" keyword at the end of functions or subfunctions, given that it only became relevant with the (more recent) introduction of nested functions.

Guillaume <gyom>
Mon 12 Sep 2016 05:08:33 PM UTC, comment #4:

Easy workarounds are to use the "end" or "endfunction" keyword always, or to set breakpoints from the command window, after which they will be marked correctly as being set in the editor window.

Mike Miller <mtmiller>
Project Administrator
Mon 12 Sep 2016 05:07:07 PM UTC, comment #3:

Sorry, you are probably right, I have no idea about undocumented Matlab shortcut syntaxes.

Anyway, yes I see the same thing, and it is only limited to the GUI editor, only on the second or further down subfunction, and only when using this no-end-keyword shortcut syntax. Setting a breakpoint from the command line with "dbstop test_breakpoint>bbbb 8" works fine. This is strictly limited to the editor interface.

Mike Miller <mtmiller>
Project Administrator
Mon 12 Sep 2016 04:36:02 PM UTC, comment #2:

Apologies in advance if I'm embarrassingly wrong but I thought that in my example the functions aaaa() and bbbb() where subfunctions and not nested functions. I.e. this is equivalent to this:

while a nested function example would be:

Guillaume <gyom>
Mon 12 Sep 2016 04:29:08 PM UTC, comment #1:

Confirmed, this is a known limitation of the interpreter as well, see bug #47917. These are nested functions, btw. If you add "end" or "endfunction", they become subfunctions (Matlab calls them "local functions").

I'll leave this open in case some GUI work needs to be done once the interpreter supports setting breakpoints in nested functions.

Mike Miller <mtmiller>
Project Administrator
Mon 12 Sep 2016 12:39:46 PM UTC, original submission:

In the following example (file test_breakpoint.m) of 8 lines, I can only set a breakpoint to lines 2, 3, 5, 6 but not 8 (ie in the second subfunction) when using the build-in editor:

If 'endfunction' statements are added to each function, it works.

Guillaume <gyom>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by gyom (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 12 Sep 2016 05:07:07 PM UTCmtmillerSeverity3 - Normal=>2 - Minor
      StatusPostponed=>Confirmed
      SummaryCannot set breakpoints in nested functions from GUI editor=>Cannot set breakpoints in subfunctions from GUI editor when not using "endfunction" keyword
    Mon 12 Sep 2016 04:30:53 PM UTCmtmillerSummaryCannot set breakpoints in subfunctions=>Cannot set breakpoints in nested functions from GUI editor
    Mon 12 Sep 2016 04:29:08 PM UTCmtmillerItem GroupNone=>Incorrect Result
      StatusNone=>Postponed
      Dependencies-=>Depends on bugs #47917

    Back to the top


    Powered by Savane 3.1-cleanup1