MATLAB: Am I unable to do “Save and Run” while in debug mode in MATLAB 7.0.1 (R14SP1) as I was able to do in MATLAB 6.5 (R13)

MATLAB

I would like to use "Save and Run" option while in debug or keyboard mode in MATLAB 7.0.1 (R14SP1).
When I execute the following commands:
function test2()
plot(1:10);
keyboard
The computation stops at the keyboard command, as expected.
I would like to make a modification, eg. plot(1:11), then "Save and Run" with a single click. I was able to do it in MATLAB 6.5 (R13) but I cannot do it in MATLAB 7.0.1 (R14SP1).

Best Answer

You cannot use the "Save and Run" option while in debug or keyboard mode in MATLAB 7.0.1 (R14SP1). You must exit debug/keyboard mode before selecting it. To exit debug mode, you can either Use the "Exit Debug mode" toolbar button/menu item, or use the "Continue" toolbar button/menu item. Once you are out of debug mode, press the "Save and Run" toolbar button, or use the Debug -> Save and Run menu item.
There was a bug in MATLAB 6.5 (R13) that left "Save and Run" enabled while the program was stopped in debug (or keyboard) mode. This allowed you to save the file, but when it was re-run the version in MATLAB's memory was executed (so you were not actually running the new version of the file). It is not possible to run the new version of the file until you have exited debug/keyboard mode.