Main Content

break

Insert breakpoint before specified method in simulation debugging session

Description

break inserts a breakpoint before the current method.

Note

This function is supported only for simulation debugging sessions started programmatically using the sldebug function or using the sim function with the 'debug' name-value argument.

break m:mid inserts a breakpoint before the method with the method ID mid.

break blk inserts a breakpoint before each method for the block blk.

break blk mth tid:t inserts a breakpoint before the method mth of block blk in the task with task ID t.

break mdlName blk mth tid:t inserts a breakpoint before the method mth of block blk that is executed in the task with task ID t in the referenced model with the name mdlName.

break sys inserts a breakpoint before each method in the system sys.

break sys mth tid:t inserts a breakpoint before the method mth in the system sys with task id t.

break mdl inserts a breakpoint before each method of the model mdl.

break mdl mth tid:t inserts a breakpoint before the method mth in the task with task ID t of model mdl.

Input Arguments

collapse all

Method ID, specified as a method ID.

Block, specified as one of these options:

  • (t)s:b — Block with index b in system with index s and task with task ID t

  • gcb — Current block

Method name, specified as a string or a character vector. For example, this command sets a breakpoint before the Outputs method of the currently selected block.

break gcb Outputs

Task ID, specified as a task ID.

Name of referenced model, specified as a string or a character vector.

System, specified as one of these options:

  • s:sysIdx — System specification, where sysIdx is the system index

  • gcs — Current system

Model name, specified as a string or a character vector.

Tips

To determine the current location within the simulation, use the where function.

Version History

Introduced before R2006a