调试
设置断点以停止在特定对象中的执行,例如图、状态、转移、图形函数、真值表函数、局部事件和输入事件。在“断点和监视”窗口中启用、禁用和设置断点条件。在“断点和监视”窗口中添加要在仿真期间监视的数据。在断点处停止执行后,更改数据值并步进仿真。
此外,在仿真期间,您可以在 MATLAB® 命令行窗口中显示和更改 Stateflow® 数据的值。
有关调试在 MATLAB 中执行的 Stateflow 图对象的信息,请参阅Debug a Standalone Stateflow Chart。
主题
- Set Breakpoints to Debug Charts
A breakpoint indicates a point at which Stateflow halts the simulation of a chart.
- 在调试模式下检查和修改数据和消息
向您说明在仿真过程中跟踪 Stateflow 数据和自主活动值的各种方法。
- 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.
- 在编辑时检测建模错误
在设计 Stateflow 图时发现建模错误。
- 检测仿真期间常见的建模错误
在仿真 Stateflow 图时,发现常见的建模错误。
- 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.