Add a New Comment (Rich Markup)
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
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.
(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
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 project members can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 3 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.12