Description
The break command
enables you to add or remove a breakpoint on a given occurrence.
Syntax
break <object> <op> <breakPointType> <data>
Arguments
object
Specifies the object.
This specification must be #All,
a valid class name, or a valid instance name.
Setting
a breakpoint on a class implies setting a breakpoint on all its instances
and subclasses.
op
Specifies
the operation. The possible values are +, –, add, or remove. The default
value is add.
breakPointType
Specifies
the type of breakpoint. The possible values are as follows:
- instanceCreated means with class
only. Breaks when a new instance of this class (or a subclass of it)
is created.
- instanceDeleted means
breaks when
the instance (an instance of the class) is deleted.
- termination means breaks when
the instance (an instance of the class) reaches a termination connector.
Does not break if the instance is deleted in a way other than by entering
a termination connector.
- stateEntered <state
name> means
if a state name is specified, it breaks when the instance (an instance
of the class) enters that state. If the state name is omitted, it
breaks when instance enters any state.
- stateExited <state
name> means
if a state name is specified, it breaks when the instance (an instance
of the class) exits the given state. If the state name is omitted,
it breaks when instance exits any state.
- state <state
name> means
if a state name is specified, it breaks when the instance (an instance
of the class) enters or exits the given state. If the state name is
omitted, it breaks when instance exits or enters any state.
- relationConnected <relation
name> means if a relation name is specified,
it breaks when a new instance is connected to the given relation for
this instance (an instance of this class). If the relation name is
omitted, it breaks when a new instance is connected to any relation.
- relationDisconnected <relation
name> means if a relation name is specified,
it breaks when an instance is removed from the given relation for
this instance (an instance of this class). If the relation name is
omitted, it breaks when an instance is removed from any relation.
- relationCleared <relation name> means
if a relation name is specified, it breaks when the given relation
for this instance (an instance of this class) is cleared. If the relation
name is omitted, it breaks when any relation is cleared.
- relation <relation name> means
if a relation name is specified, it breaks when a new instance is
connected to the relation, an instance is deleted from the relation,
or the relation is cleared for this instance (an instance of this
class). If the relation name is omitted, it breaks when a new instance
is connected to any relation, an instance is deleted from any relation,
or any relation is cleared
- attribute means
instance only.
Breaks when any of the attributes of the given instance changes. When
the breakpoint is set, a copy of the attribute values of the instance
is stored. When any of the attribute values change with respect to
this copy a break occurs. After the break, a copy of the new (modified)
values is kept as the reference.
- gotControl means
breaks when the
instance (an instance of the class) gets control. This happens when
the instance starts executing one of its user-defined operations,
the instance responds to an event, or an operation the instance called
from another object has finished and now it resumes executing.
- lostControl means breaks when
the instance (an instance of the class) loses control; that is, either
it has finished executing an operation and it now returns, it finished
responding to an event, or it calls an operation of another object.
- operation <operation name> means
if an operation name is specified, it breaks when the instance (an
instance of the class) starts executing the named operation. If the
operation name is omitted, it breaks when the instance starts executing
any of its user-defined operations.
- operationReturned <operation
name> means if an operation name is specified,
it breaks when the instance (an instance of the class) returns from
executing the named operation. If the operation name is omitted, it
breaks when the instance returns from executing any of its user-defined
operations.
- eventSent <event
name> means
if an event name is specified, it breaks when the instance (an instance
of the class) sends the named event. If the event name is omitted,
it breaks when the instance sends any event.
- eventReceived <event
name> means
if an event name is specified, it breaks when the instance (an instance
of the class) receives the named event. If the event name is omitted,
it breaks when the instance receives any event.
- all indicates
all breakpoints.
This keyword can be used only to remove all breakpoints.
For example, the following command removes all breakpoints
on B[5]: break B[5] - all
The following command removes all breakpoints
from the animation:
break #all - all
data
Is context-dependent. See breakPointType. Breakpoints that
take data are shown with the data parameter in angle brackets.
Setting a breakpoint on some occurrence causes execution
to stop when that occurrence happens. For example, the following command
causes execution to stop when B[2] enters state ROOT.S1:
break B[2] stateEntered ROOT.S1
Saving
Breakpoints
To save breakpoints, write them
to a file (for example, myBreakPoints.cfg).
After you have saved them, you can reinsert them next time you run
the application by typing the following command:
input myBreakPoints.CFG