dbclear all removes all breakpoints in
all MATLAB® code files, and all breakpoints set for errors, caught
errors, caught error identifiers, warnings, warning identifiers, and naninf.
File name, specified as a character vector or string scalar. The file name can include a
partial path, but must be in a folder on the search path, or in the current
folder.
Example: myfile.m
If the file name is followed by the -completenames option,
then the file does not need to be on the search path, as long as the
file name is a fully qualified name.
In addition, file can include a filemarker
(>) to specify the path to a particular local
function or to a nested function within the file.
Example: myfile>myfunction
Data Types: char | string
location — Location in file line number | line number and anonymous function number | local function name
Location in file of breakpoint to clear,
specified as follows:
Line number in file specified as a character vector or string scalar. The
default is 1.
Line number in file, at the anonymous function number, specified as a
character vector or string scalar. For example,
1@2 specifies the second anonymous function
on line number 1. If no anonymous function number is specified, then
the default is 1.
Name of a local function in file specified as a character vector or string
scalar.
Data Types: char | string
condition — Type of error breakpoint error | caught error | warning | naninf | ...
Type of error breakpoint, specified as follows:
error — Run-time error that occurs outside a
try/catch block. If you want to clear a
breakpoint set for a specific error, then specify the message id.
For example:
dbclear if error clears all breakpoints
set with the dbstop if error command, including
breakpoints with a specified message id.
dbclear if error MATLAB:ls:InputsMustBeStrings clears
the error with a message ID of MATLAB:ls:InputsMustBeStrings.
caught error — Run-time error that occurs within the
try portion of a try/catch
block. If you want to clear a breakpoint set for a specific error,
then specify the message id.
warning — Run-time warning. If you want to clear a breakpoint set
for a specific warning, then specify the message id.
This condition has no effect when you disable warnings with the warning off
all command or when you disable warnings for the
specified message id. For more information about disabling warnings,
see warning.
naninf — Not-a-number error
or infinite value error. These errors occur when code returns an infinite
value (Inf) or a value that is not a number (NaN)
as a result of an operator, function call, or scalar assignment.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.