In R2007b, code folding was introduced in the Editor for functions and help comments. I find this particularly useful for large M-files like edit.m, which have a lot of subfunctions. By collapsing all the folds in the file, I can quickly skim through the helper subfunctions.
By
Christina Roberts
Christina has been working on the MATLAB Editor since 2001. When she's able to tear herself away from that, she enjoys building furniture, playing the violin, and working on her poker skills.
That’s great!
but… I’m waiting since 4 or 5 Releases for these option:
SAVE BREAKPOINTS
SAVE BREAKPOINTS CONDITIONS
SAVE BOOKMARKS
by leave the session.
I think it should be easy to implement, isn’t it?
Best Regards
J.R.!
Hi J.R.,
Your absolutely right! Saving breakpoints, breakpoint conditions and bookmarks are blatantly missing features.
You can actaully save breakpoints and conditional breakpoints manually by doing the following:
To save:
>> mybreakpoints = dbstatus;
>> save mydebugsession mybreakpoints
To load:
>> load mydebugsession mybreakpoints
>> dbstop(mybreakpoints)
We are currently working on more seamless ways to do this though.
-Ken
Personally, I love the new folding feature. I would love to see folding SWITCH statements since I often parse through dozens of input arguments to VARARGIN and they often take up 100 or more lines of particularly ugly code (try-catches, warnings messages, error messages, long conditional statements). I’ve started to put them into a large subfunction which modifies pre-initialized flag variables just so I can foldd it out-of-site but I don’t like habitually sharing variables between functions like that.
Thanks
Will
Hi Will,
We will fold switch statements in a future release. Thanks for letting us know how you are using code folding!
-Christina