dbstop
Set breakpoints for debugging
Syntax
Description
dbstop in sets
a breakpoint at the first executable line in filefile.
When you run file, MATLAB® enters debug mode,
pauses execution at the breakpoint, and displays the line where it
is paused.
dbstop in sets
a breakpoint at the specified location. MATLAB execution pauses
immediately before that location, unless the location is an anonymous function.
If the location is an anonymous function, then execution pauses just
after the breakpoint.file at location
dbstop in sets
a conditional breakpoint at the first executable line of the file.
Execution pauses only if file if expressionexpression evaluates to
true (1).
dbstop in sets
a conditional breakpoint at the specified location. Execution pauses
at or just before that location only if the file at location if expressionexpression evaluates
to true.
Examples
Input Arguments
Tips
Before you begin debugging, make sure that your program is saved and that the program and any files it calls exist on your search path or in the current folder.
To resume execution after a breakpoint pauses execution, use
dbcontordbstep. To exit debug mode, usedbquit. To remove all the breakpoints in the file, usedbclear in. To remove all breakpoints in all files, usefilenamedbclear all. For more information, seedbclear.MATLAB can become unresponsive when it pauses at a breakpoint while displaying a modal dialog box or figure created by your program. To exit debug mode and return to the MATLAB prompt (
>>), use Ctrl+C.