Can't set breakpoints on changed m-file
Show older comments
I run a numerical simulation called "myfile.m". Then I accidentally changed the code of "myfile.m", by accidentally inserting a character somewhere. The file now has an asterisk "myfile.m*". By itself not a big issue, but now I can't debug anymore :( Setting breakpoints gives a gray bullet instead of a red one. And it says "Save file to synchronize breakpoints". When I press "save", it says "Cannot save myfile.m while it is being debugged. Exit debug mode and save?" .... I am kinda scared to do this, because I remember having pressed this before and the whole simulation stopped, not just the debugging. And I don't know what is meant by "Exit debug". I am not debugging anyway. The simulation has been running for 24 hours, and the last time the red bulletpoints worked it showed some very good intermediate results, so I really don't want to waste them. But it will go on for another 24 hours, and I don't have the time, so I want to save the intermediate results stored in the variables, which I can only access using the breakpoints, right?
Accepted Answer
More Answers (2)
Walter Roberson
on 27 Apr 2017
1 vote
I would have used control-Z (or, in OS-X, command-Z) in order to Undo the change to the file. That would make the editor happy.
Marloeys
on 27 Apr 2017
0 votes
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!