Why does Simulink take me to the MATLAB debug mode when there is an error in a MATLAB Function block in MATLAB R2016a?

I have a Simulink model that is using a MATLAB Function block. If there are runtime errors in the MATLAB code, when I run the model the simulation stops and the view switches to the MATLAB Editor in debug mode where the error occurs. I already turned off debugging in MATLAB with "dbclear all" but Simulink is still switching to debug mode when there are MATLAB errors. How do I fix this?

 Accepted Answer

This issue is caused by the model Configuration Parameter "Allow setting breakpoints during simulation". You can find this parameter by searching by name in the "All Parameters" tab of the Configuration Parameters window. To stop Simulink from switching to MATLAB debug mode when errors occur in MATLAB files, uncheck this option.

More Answers (0)

Categories

Find more on Simulink in Help Center and File Exchange

Products

Release

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!