Breakpoints List
Description
The Breakpoints List provides information about all breakpoints configured in your model, including breakpoints in Stateflow® charts and code for MATLAB Function blocks. The Breakpoints List displays breakpoints configured throughout the model hierarchy.
Using the Breakpoints List, you can:
View all breakpoints in the model along with breakpoint information, such as the breakpoint source.
Navigate to the location of each breakpoint in the model hierarchy.
Enable and disable individual breakpoints or all breakpoints.
Delete breakpoints.
Enable and disable low-level debugging that provides options to:
Step through simulation block by block.
Pause within a time step as soon as a breakpoint condition is met.
Add model breakpoints to pause when a condition, such as an
Inf
orNaN
value, occurs anywhere in the model.
Breakpoints are not saved as part of the model.
Open the Breakpoints List
Simulink® Toolstrip: On the Debug tab, click Breakpoints List.
Simulink Editor: Click the breakpoint icon on a signal that has a breakpoint.
When you open the Breakpoints List by clicking a breakpoint, the row for the breakpoint you clicked is highlighted purple in the table.
Examples
Related Examples
Parameters
Limitations
Only normal mode simulations support low-level debugging.
Breakpoints and stepping into model references are supported only for the instance that has normal mode visibility. For more information, see Simulate Multiple Referenced Model Instances in Normal Mode.
Signal breakpoints do not support specifying the condition using variables, expressions, or symbols such as π (
pi
).Signal breakpoints are supported only for real scalar signals with these data types:
double
single
int
Boolean
Fixed-point
For fixed-point signals, the software converts the data type of the signal value to
double
and uses the converted value to check for the breakpoint condition.
The limitations for port value labels also apply for signal breakpoints. For details, see Additional Considerations for Using Port Value Labels.
The stepping and breakpoint options in the Simulink Editor do not have a direct programmatic equivalent available in the software. The Simulink debugging programmatic interface includes options for setting breakpoints and stepping through simulations. However, the behavior of these functions is not identical to the behavior of the stepping options in the Simulink Editor. For more information about programmatic debugging, see Simulink Debugging Programmatic Interface.
Tips
To view signal values in the model while debugging, use port value labels. To add a port value label for a signal, select the signal. Then, on the Debug tab, in the Tools section, next to Output Values, click Show Output Value of selected signal . For more information, see View Signal Values Using Port Value Labels.
To save time when iteratively debugging, consider enabling fast restart. With fast restart enabled, the model compiles only the first time you simulate. Subsequent simulations run faster by skipping the compilation phase. While fast restart is enabled, you can modify the model only in ways that do not require compiling the model. For more information, see How Fast Restart Improves Iterative Simulations.
To enable stepping into Stateflow charts during a simulation debugging session, enable the Allow setting breakpoints during simulation configuration parameter before starting the simulation debugging session.
While paused within a time step, the MATLAB® command prompt is replaced with the
sldebug
command prompt. You can use some of the programmatic debugging functions, including thedisp
function, to get more information about the system behavior. For more information, see Simulink Debugging Programmatic Interface.By default, the Breakpoints List opens as a pane at the bottom of the Simulink Editor. You can reposition the Breakpoints List to suit your workflow.
To dock the Breakpoints List to a different part of the Simulink Editor, drag the pane to another part of the window.
To minimize the Breakpoints List, click the arrow in the upper right and select Minimize.
To use the Breakpoints List as a separate window, drag the pane out of the Simulink Editor or click the arrow in the upper right and select Undock.