Debugger : The Set File, Set Output And Cancel Output Commands : SET BREAK Command

SET BREAK Command

You define a breakpoint with the SET BREAK command:

Pdb > SET BREAK breakpoint_label trigger_expression

 

 

The execution is suspended each time the event specified by the trigger_expression occurs that is after the step in which the event was generated and before the step in which it is actually sensed.

The breakpoint label is used to refer to the breakpoint in the SHOW BREAK and CANCEL BREAK commands.

In cases where the label is used more than once, the latter one takes effect, overriding the previous definition of the breakpoint.

The second argument of the SET BREAK command is any legal Rational Statemate trigger expression using the same syntax used for transitions. These consist of the:

For example:

Pdb > SET BREAK label_1 TRUE(ACTIVE(A))

 

As a result, the execution is suspended each time the activity A is activated, while after:

Pdb > SET BREAK label_2 ENTERED(S) or
E [ACTIVE(A)]

 

 

it is suspended when either the system enters the state S or event E occurs and activity A is active at the same moment.

Finally, after:

Pdb > SET BREAK label_3 [ACTIVE(A)]

 

 

the execution is first suspended when A is activated, and then, after each successive step in which A remains active. This differs from the case of the breakpoint label_1 above which occurs only when A is activated but not in the next steps unless A is reactivated.