MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1

To clear all breakpoints in the file, select Clear All in File. To clear all breakpoints in all
files, select Clear All.


Breakpoints clear automatically when you end a MATLAB session.


Disable Breakpoints


You can disable selected breakpoints so that your program temporarily ignores them and
runs uninterrupted. For example, you might disable a breakpoint after you identify and
correct a problem.


To disable a breakpoint, right-click it and select Disable Breakpoint from the context
menu. The breakpoint becomes gray to indicate that it is disabled.


To reenable a breakpoint, right-click it and select Enable Breakpoint from the context
menu. To enable or disable all breakpoints in the file, select Enable All Breakpoints in
File or Disable All Breakpoints in File. These options are only available if there is at
least one breakpoint to enable or disable.


Add Conditional Breakpoints


You can add a condition to a breakpoint that tells MATLAB when to pause at the specified
line. To add a condition, right-click the breakpoint and select Set/Modify Condition.


Debug Code in the Live Editor
Free download pdf