Overview of breakpoints (system simulation)
If you are simulating a C++ code or Java application, you can add breakpoints to your simulation. To use breakpoints in a simulation the C++ or Java Profile must be present in the model.
You can add breakpoints to most of the item types that appear on a State Diagram. For some item types, such as a State, you can add an on entry breakpoint and an on exit breakpoint.
To enable the use of breakpoints, select the Enable/Disable Breakpoints button on the Simulation tab. When breakpoints are enabled, the simulation is suspended when it hits any enabled breakpoints. When breakpoints are disabled, the simulation ignores all breakpoints, irrespective of whether the individual breakpoints are enabled or disabled.
Enable/Disable Breakpoints button when use of breakpoints is enabled.
Enable/Disable Breakpoints button when use of breakpoints is disabled.
To add a breakpoint to a State Diagram item: right-click the item, point to Breakpoints, and then click 'Break', 'Break on Entry' or 'Break on Exit'. You can add breakpoints through a Modeler pane, on a State Diagram, or on an instance diagram while a simulation is or is not running.
After adding a breakpoint to an item, a breakpoint symbol appears on or near to its diagram symbol. The following notation is used:
Breakpoint
On Entry Breakpoint
On Exit Breakpoint
When the simulation hits a breakpoint, Modeler suspends the simulation and the breakpoint that was hit is shown in red:
Breakpoint when hit
On Entry Breakpoint when hit
On Exit Breakpoint when hit
To resume the simulation that has been suspended, click the Suspend/Resume button on the Simulation tab.
Suspend/Resume Simulation button when simulation is suspended.
Suspend/Resume Simulation button when simulation is running.
After adding a breakpoint, you can disable that breakpoint without removing it. To disable a breakpoint: right-click the breakpoint's item, point to Breakpoint, and then clear the Breakpoint Enabled, On Entry Breakpoint Enabled, or On Exit Breakpoint Enabled command as appropriate.
When a breakpoint has been disabled, the following notation is used:
Breakpoint when disabled
On Entry Breakpoint when disabled
On Exit Breakpoint when disabled
Note that the breakpoints you set up do not apply to any other users of the model.