Debugging
Set breakpoints to stop execution in specific objects, such as charts, states, transitions, graphical functions, truth table functions, local events, and input events. Enable, disable, and set conditions on breakpoints in the Breakpoints and Watch window. Add data that you want to monitor during simulation in the Breakpoints and Watch window. After execution stops at a breakpoint, change data values and step through the simulation.
In addition, during simulation, you can display and change the values of Stateflow® data in the MATLAB® Command Window.
For information on debugging Stateflow chart objects that you execute in MATLAB, see Debug a Standalone Stateflow Chart.
Topics
- Set Breakpoints to Debug Charts
A breakpoint indicates a point at which Stateflow halts the simulation of a chart.
- Inspect and Modify Data and Messages While Debugging
Shows you various ways that you can track the values for Stateflow data and self activity during simulation.
- Control Chart Execution After a Breakpoint
A breakpoint indicates a point at which Stateflow halts the simulation of a chart.
- Use Active State Output to Debug Charts
Find and eliminate errors in Stateflow charts.
- Detect Modeling Errors During Edit Time
Discover modeling errors as you design your Stateflow chart.
- Detect Common Modeling Errors During Simulation
Find common modeling errors when you simulate your Stateflow chart.
- Animate Stateflow Charts
Visually check behavior during simulation by using chart animation.
- Comment Out Objects in a Stateflow Chart
Exclude Stateflow objects from simulation.
- Debug Run-Time Errors in a State Transition Table
Use breakpoints to debug state transition tables.
- Debug a MATLAB Function in a Chart
Use breakpoints to debug MATLAB functions.
- Debug Errors in a Truth Table
Use breakpoints to debug truth tables.
- Avoid Unwanted Recursion in a Chart
Describes guidelines for avoiding unwanted recursive behavior.