The debug features of MLDesigner are only available via the context menu when MLDesigner is in Simulation Mode and the Breakpoints On/Off toolbar button is toggled. This is an interactive tool for locating and diagnosing inconsistencies or bugs in your modules and systems. With breakpoints, you can specify where and when you want a system to pause during a simulation.

Place a Breakpoint

To place a breakpoint you need to Switch to Simulation Mode. Once you are in Simulation Mode click the Breakpoints On/Off icon on the toolbar and activate the context menu over the model instance where you would like to place the breakpoint. Select Add Breakpoint from the context menu.

If there are existing breakpoints on the model instance you chose, the new breakpoint will get a unique identifier. You have the option of selecting and enabling multiple breakpoints. For a quick access to the breakpoints in a system the Console View provides a Breakpoints plane. There, all breakpoints of the current simulation are listed. With a click on a breakpoint in this list the Model Editor containing the associated instance is activated and focused on the location of that breakpoint. With a right-click you can Enable/Disable or Remove one specific or all breakpoints.

Unconditional Breakpoints

It is possible to place unconditional breakpoints. The simulation pauses as soon as a model instance containing a breakpoint fires or an event is produced at the specified point in the simulation. You can adjust these breakpoints to ignore a certain number of firings or events before pausing the simulation by setting the value of the Ignore Count property.

Ignore Count Breakpoints

The Ignore Count property sets the amount of times a model instance or port fires before stopping the simulation. Once the instance has fired the specified number of times, the breakpoint becomes an unconditional breakpoint and stops the simulation every time it fires. Enter a numerical value in the Ignore Count input field.

Module Breakpoints

If a module is instantiated more than once in a system the option of placing a module breakpoint is available for model instances in this module.

In the topmost area of the Select source model dialog a list of possible model instances is displayed. It is possible to select one or more instances from this list by mouseclick. When a selected module fires the simulation will pause.

In short, breakpoints are useful when you know that at a certain point in your program, or, when a certain condition occurs, a problem exists. By defining an appropriate breakpoint, you can stop a simulation at the point in the simulation where the problem appears. In simulation mode the tool tip text facility no longer displays a name and description for the model instance but rather displays values and parameters of the model instance or input/output port. There are a number of types of breakpoints depending on the type of model instance. The following types are implemented in MLDesigner:

For more information on breakpoints see debugging and analyzing systems.