Quit debug mode
dbquit terminates debug mode. The Command
Window then displays the standard prompt (
The file being executed is not completed and
no results are returned. All breakpoints remain in effect.
If MATLAB® is in debug mode for more than one function,
terminates debugging for the active function. For example, if you
file1 and also debug
dbquit terminates debugging for
file1 remains in debug mode until you run
However, if you debug
file3 and step into
dbquit terminates debugging for both
dbquit all ends debugging for all files
Create a file,
buggy.m, that contains
function z = buggy(x) n = length(x); z = (1:n)./x;
Create a second file,
contains these statements.
function z2 = buggy2(y) m = length(y); z2 = (1:m).*y;
Set breakpoints in
run both files. MATLAB pauses at the first line in
dbstop in buggy dbstop in buggy2 buggy(5) buggy2(5)
dbstack command to check the
In buggy2 (line 2) In buggy (line 2)
Quit debugging. MATLAB ends debugging for
buggy remains in debug mode.
In buggy (line 2)
dbquit again to exit debug mode
dbquit all ends debugging
for both files simultaneously.