close file and quit debugger
Show older comments
Hi all,
Normally I code with "dbstop if error" enabled. Sometimes I type something which I know is an error (like forgetting to specify an input) in which I would rather the debugger not get enabled.
When encountering the error Matlab will open the file in question and place the cursor at the start of line.
I would like to write a function which closes the document in question and then quits the debugger.
I wrote some code to do this but when I run dbquit, the closed document opens again. Any suggestions on how to get around what I assume is a bug?
active_doc = matlab.desktop.editor.getActive;
active_doc.close();
%Bug ????
evalin('caller','dbquit');
%dbquit;
Thanks, Jim
Answers (0)
Categories
Find more on Debug Code 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!