I found the "always stop on error (dbstop if error)" to be very useful when I debug MATLAB code.
However, closing matlab also resets it to "Never stop if error"
How can I make this setting persist?
To set a conditional breakpoint, right-click the gray area to the left of the executable line where you want to set the breakpoint and select Set Conditional Breakpoint. If a breakpoint already exists on that line, select Set/Modify Condition. In the dialog box that opens, enter a condition and click OK.
To exit debug mode, press Alt+B followed by D.
Typing pause(inf) puts you into an infinite loop. To return to the MATLAB prompt, type Ctrl+C. Example: pause(3) pauses for 3 seconds. Example: pause(5/1000) pauses for 5 milliseconds.
This is the solution indeed - further digging in Mathworks brought up the exact details:
In the default folder typing
edit startup.m
And then writing
dbstop if error
Thanks Schroeder!
You could use the startup.m file to recreate your settings at startup. See here for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With