Allow setting breakpoints during simulation
Option to allow setting breakpoints in MATLAB code and Stateflow charts during simulation
Model Configuration Pane: Simulation Target
Description
The Allow setting breakpoints during simulation parameter controls whether you can set breakpoints during simulation in MATLAB Function blocks, Stateflow® charts, State Transition blocks, and Truth Table blocks. This parameter only applies to breakpoints that you add when your simulation is actively running. Simulink® does not recognize breakpoints that you add when the simulation is paused.
This parameter does not affect signal breakpoints for debugging in Simulink. You can add signal breakpoints while paused in simulation. For more information, see Debug Simulation Using Signal Breakpoints.
Enabling this parameter has significant performance impact for models that contain multiple MATLAB Function blocks, Stateflow charts, State Transition blocks, or Truth Table blocks. Enable this parameter only when you want to debug a simulation of the model.
This parameter value is not saved as part of the model configuration.
Settings
off
(default) | on
off
Disables the ability to add breakpoints in MATLAB Function blocks, Stateflow charts, State Transition blocks, and Truth Table blocks during simulation.
Use this setting when you do not intend to debug the simulation. When you clear this parameter, if the model does not contain breakpoints when you start simulation, the software does not enable debugging capabilities for these blocks and modeling constructs, which can improve simulation performance.
on
Enables adding breakpoints in MATLAB Function blocks, Stateflow charts, State Transition blocks, and Truth Table blocks during simulation.
Use this setting when you need to debug a simulation of a model that contains these blocks. Enabling this parameter can degrade simulation performance, but also provides flexibility for debugging simulations. You can pause the simulation, add breakpoints, and then continue the simulation.
Recommended Settings
Application | Setting |
---|---|
Debugging |
|
Traceability | No impact |
Efficiency |
|
Safety precaution | No impact |
Programmatic Use
Parameter: SFSimEnableDebug |
Type: string | character vector |
Values:
'on' | 'off' |
Default: 'off' |
Version History
Introduced in R2008b