bugGNU Octave - Bugs: bug #51271, restore debug points on startup or...

 
 

bug #51271: restore debug points on startup or run .octaverc in restored pwd

Submitter:  Marshall <marsian>
Submitted:  Mon 19 Jun 2017 09:40:41 PM UTC
   
 
Category:  Interpreter Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  None Assigned to:  None
Originator Name:  Marsian Open/Closed:  * Open
Release:  * 4.2.1 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 19 Jun 2017 09:55:39 PM UTC, comment #1: 

I found an ugly workaround. If I put the following in ~/.octaverc or ~/startup.m, then breakpoints are restored properly after hitting continue. Slightly less tedious than having to remember to run and then manually running the following lines, but not perfect.


if exist("~/dbstats.bp")==2
        keyboard%Force debugging to allow working directory to be changed before continuing.
        dbload = load("~/dbstats.bp","dbstats");
        dbstop(dbload.dbstats);
endif



Marshall <marsian>
Mon 19 Jun 2017 09:40:41 PM UTC, original submission:  

I want to restore the debug break points from the previous octave session. Please either make this an option along with the "Restore working directory of previous session" option in the General Preferences Settings, or run .octaverc or startup.m files that exist in the restored working directory due to selecting this option.

More details: I have the "Restore working directory of previous session" option and "Restore editor tabs from previous session on startup" options both selected. I want the breakpoints to also be restored as set when closing octave from the previous session. I can almost do this automatically with finish.m and startup.m (or .octaverc) files with the following commands:

%Save breakpoints:
dbstats = dbstatus;
save dbstats.bp dbstats

%Load breakpoints:
if exist("dbstats.bp","file")
        dbload = load("dbstats.bp","dbstats");
        dbstop(dbload.dbstats);
endif

If I put the save code in the pwd, then saving the file works and manually running the load code works. But I run in to the problem that I can't get the load code to run automatically at startup: as stated by the "Restore working directory" option, .octaverc startup files are run before the last working directory is restored. I can set the files to be saved in ~/dbstats.bp, so they can be found by .octaverc in the home directory, but then the breakpoints can not be set because the files the breakpoints references aren't on the path yet, because the working directory hasn't been changed appropriately yet.

Marshall <marsian>

 

(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 mtmiller (Updated the item)
  • -email is unavailable- added by marsian (Submitted the item)
  • -email is unavailable- added by marsian
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-20 mtmiller CategoryNone Interpreter
        Severity3 - Normal 1 - Wish
    2017-06-19 marsian Carbon-Copy- Added marsian

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code