Debug Simulations in the Simulink Editor
Debug and analyze simulations in the model canvas, set breakpoints, step
through time steps and block execution
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.
Tools
Simulation Stepping Options | Enable stepping back and configure number of time steps to move when stepping through simulation |
Breakpoints List | View, configure, and manage breakpoints for debugging models |
Topics
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 at points of interest 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
- Display Port Values for Debugging
Display the values of block outputs on the block diagram during simulation. - Control and Display Execution Order
Determine the execution order among blocks within tasks. - View Sample Time Information
How to access sample time information interactively.