Defining breakpoints

This topic lists possible reasons for breakpoints and what, if any, optional data you can provide for each breakpoint.

Procedure

  1. In the Breakpoints window, click New. The Define Breakpoint window opens.
    Define Breakpoint window
  2. Click Select to select the object for which you want to define the breakpoint, or type the name of the instance directly into the Object field. The Instances Selection window opens.
    Instances Selection window
  3. Select the instance for which you want to define the breakpoint from the list, then click OK.

    The Instances Selection window is dismissed and the selected object displays in the Object field of the Define Breakpoint window.
    Note: In general, entering a class name for the object causes the breakpoint to operate on any instance of the class, whereas entering an instance name causes the breakpoint to operate on a specific instance.
  4. Click the Reason drop-down list to view a list of possible reasons for the breakpoint. Select the appropriate reason.

Results

Some reasons might require additional data. For example, if you want to regain control when an object enters a particular state, you must provide the state name. If a state name is not provided, the break occurs when the object enters any state.

The following table shows the possible reasons for breakpoints and what, if any, optional data you can provide for each breakpoint.

Table 1. Possible reasons for breakpoints and what, if any, optional data you can provide for each breakpoint
Reason for break Object Data Description
Instance Created Class None Break when any instance of the class is created.
Instance Deleted Class or instance None Break when an instance of the class is deleted.
Termination Class or instance None Break when an instance reaches a termination connector in its statechart.
State Entered Class or instance State name Break when an instance enters a state.
State Exited Class or instance State name Break when an instance exits a state.
State Class or instance State name Break when an instance:
  • Enters a state
  • Exits a state
Relation Connected Class or instance Relation name Break when a new instance is connected to a relation.
Relation Disconnected Class or instance Relation name Break when an instance is removed from a relation.
Relation Cleared Class or instance Relation name Break when a relation is cleared for an instance.
Relation Class or instance Relation name Break when:
  • A new instance is connected to a relation.
  • An instance is deleted from a relation.
  • A relation is cleared for an instance.
Attribute Instance None Break when any attribute of the instance changes value. A copy of the attribute values is stored and current values are compared to this copy. When a break occurs, the copy is updated with the latest values.
Got Control Class or instance None Break when an instance gets control by:
  • Starting to execute one of its user-defined operations
  • Responding to an event
  • Regaining control after an operation that the instance has called on another object finishes executing
Lost Control Class or instance None Break when an instance loses control by:
  • Finishing execution of one of its operations
  • Finishing a reaction to an event
  • Calling an operation of another object
Operation Class or instance Operation name Break when an instance starts executing a user-defined operation.
Operation Returned Class or instance Operation name Break when an instance returns from executing a user-defined operation.
Event Sent Class or instance Event name Break when an instance sends an event.
Event Received Class or instance Event name Break when an instance receives an event.

Feedback