| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
From most desktop tools, select Debug > Exit Debug Mode, or in the
Editor, click
.
dbquit
dbquit('all')
dbquit all
dbquit terminates debug mode. The Command Window then displays the standard prompt (>>). The M-file being processed is not completed and no results are returned. All breakpoints remain in effect.
If you debug file1 and step into file2, running dbquit terminates debugging for both files. However, if you debug file3 and also debug file4, running dbquit terminates debugging for file4, but file3 remains in debug mode until you run dbquit again.
dbquit('all') or the command form, dbquit all, ends debugging for all files at once.
This example illustrates the use of dbquit relative to dbquit('all'). Set breakpoints in and run file1 and file2:
>> dbstop in file1 >> dbstop in file2 >> file1 K>> file2 K>> dbstack
MATLAB software returns
K>> dbstack In file1 at 11 In file2 at 22
If you use the dbquit syntax
K>> dbquit
MATLAB ends debugging for file2 but file1 is still in debug mode as shown here
K>> dbstack in file1 at 11
Run dbquit again to exit debug mode for file1.
Alternatively, dbquit('all') ends debugging for both files at once:
K>> dbstack
In file1 at 11
In file2 at 22
dbquit('all')
dbstackreturns no result.
dbclear, dbcont, dbdown, dbstack, dbstatus, dbstep, dbstop, dbtype, dbup
![]() | dbmex | dbstack | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |