When Conditions and Conditional Breakpoints
When Conditions
Unlike conditional breakpoints, When conditions are not associated with a particular source line. Source statements are executed one at a time. Every defined When condition expression is evaluated after each executed source statement. While multiple When conditions can be active simultaneously, they are evaluated in the order in which they were defined. After a defined When the condition is satisfied (evaluates to true), program execution halts, positioned at the last executed source statement.
To create When conditions
- Do one of the following:
- From the ruler area of the source, right-click and select Set When Condition. The When Condition dialog box appears.
- Right-click in the Editor and select Set When Condition. The When Condition dialog box appears.
- Enter a When condition expression.
- Click OK. The When condition appears in the Breakpoints view and is evaluated when execution resumes.
When Condition Syntax
In its most basic form, a When condition consists of a variable and the keyword CHANGES. Another simple form consists of a variable, an operator, and a comparison value. The following table describes the basic set of operators common to both Code Debug TSO and IMS and Code Debug CICS.
Operator | Meaning |
< | Less than |
= | Equal to |
> | Greater than |
NOT | Logical negation |
CHANGES | Variable value changes |
For a comprehensive list of operators supported by each product's debuggers see each product's respective user documentation.
Conditional Breakpoints
Conditional breakpoints are breakpoints that only stop execution once a specified condition is met. Upon encountering a source line designated with a conditional breakpoint, Xpediter/Eclipse evaluates whether the associated condition is true. If true, the breakpoint is honored and execution stops at that source line. If false, the breakpoint is ignored and execution continues.
To create Conditional breakpoints
- Do one of the following:
- From the ruler area of the source, right-click and select Set Conditional Breakpoint. The Conditional Breakpoint dialog box appears.
- Right-click in the Editor and select Set Conditional Breakpoint. The Conditional Breakpoint dialog box appears.
- Right-click an existing before breakpoint in the Breakpoints view and select Breakpoint Properties. The Conditional Breakpoint dialog box appears.
- Enter the condition to be evaluated.
- Click OK. The condition appears in the Breakpoints view. If you modified an existing before breakpoint, the breakpoint is modified as specified to have the condition associated with it.
To disable or remove Conditional breakpoints
In the Breakpoints view, select the breakpoint and click .
Conditional Breakpoint Syntax
The rules for syntax are exactly the same as described in either the Code Debug CICS or Code Debug TSO and Code Debug IMS User Guide. In its simplest form, syntax follows the format of [variable] [condition] [value].
Related Topics