MATLAB: Does the Editor/Debugger not stop on breakpoints set in the MATLAB file function that is called from a script

allbreakpointcleardebugdebuggerdisappeareditorfunctionjavaaddpathMATLABscriptstopupdate

I have breakpoints set before I run my code. However, when I run the code, the debugger does not stop at the breakpoints, and the breakpoints are removed.
Also, I notice that after I stop my script, the breakpoints are cleared. So, if something is clearing the breakpoints, why is the editor not reflecting this clearing immediately?

Best Answer

Check for a CLEAR ALL commands anywhere before the breakpoint. As documented in the help for the CLEAR function:
clear all
clears all of the debug breakpoints.
You can resolve the breakpoint issue by commenting out all lines of code that refer to any incarnation of CLEAR that encompasses CLEAR ALL. There are a few CLEAR commands that encompass CLEAR ALL such as CLEAR JAVA. See the following URL for more information on the CLEAR command:
<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/clear.html>
Concerning the delayed update of the editor window to reflect that breakpoints have been cleared, it is not possible to have an immediate update of the editor when breakpoints are cleared in the editor.