MATLAB: How to disable all the breakpoints that have been set in a MATLAB code file in MATLAB 7.6(R2008a)

breakpointdisableMATLAB

I want to disable all the breakpoints in a MATLAB code file, from the command prompt. I do not want to right click on each break point and select the "Disable Breakpoint" option.

Best Answer

To disable all the break points in a MATLAB code file, you need to set the expression property of the breakpoints on all lines to 'false'. The following code disables all the breakpoints in the same file.
s = dbstatus
s.expression(:) = {'false'}
dbstop(s)
The structure 's' contains the line numbers of all the breakpoints, with the corresponding expression values of these break points.