Debug Simulations in the Simulink Editor
Using debugging tools available in the Simulink® Editor, you can:
Set breakpoints to pause a simulation at a point of interest.
View and manage breakpoints throughout your model.
Step through a simulation one time step at a time or one block at a time.
Add port value labels to signals to see how signal values change as you step through the simulation.
The model canvas shows breakpoints and port value labels in context within the block diagram so you can analyze, debug, and modify your model in one place.
|Breakpoints List||View, configure, and manage breakpoints for debugging models (Since R2022a)|
|Simulation Stepping Options||Enable stepping back and configure number of time steps to move when stepping through simulation|
|Simulation Pacing Options||Slow simulation to a specified ratio of simulation time to wall clock time|
Pause and Step in Simulation
- Step Through Simulation
Step through major time steps, view signal values in the block diagram, and configure simulation stepping options.
- Debug Simulation Using Signal Breakpoints
Set breakpoints to pause simulation then step through simulation block by block.
- How Stepping Through Simulation Works
Learn how simulation snapshots work.
- Debug Simulation of Iterator Subsystem
Explore options for stepping through and debugging simulations of models that contain iterator subsystems.
View Information in the Block Diagram
- View Signal Values Using Port Value Labels
View signal values in the block diagram during simulation to understand, analyze, and debug your model.
- Control and Display Execution Order
Determine the execution order among blocks within tasks.
- View Sample Time Information
How to access sample time information interactively.