Set a Variable Change Breakpoint

The variable change breakpoint is a special type of conditional breakpoint that halts program execution when the value of a specified variable changes.

A variable change breakpoint is not associated with any statement in the program. It applies to all the statements in the program.

You can add a variable change breakpoints from within the Program Listing area by right-clicking the statement where the variable is defined, and then selecting Add breakpoint.

You can also add variable change breakpoints using the following procedure. You can modify variable change breakpoints using the Configure Breakpoints icon in the Breakpoints view toolbar.

Add a Variable Change Breakpoint in the Breakpoints View

Follow these steps:

  1. Select Window, Show Views, Breakpoints.
    The Breakpoints view opens.

  2. Double-click the program for which you want to add breakpoints in the CA InterTest™ Debug view.
    The program opens in the Program Listing area.

  3. Click the Add a Global Breakpoint icon in the Breakpoints view toolbar.
    The Add Global Breakpoint dialog opens.

  4. Select Variable Change under the Breakpoint Type.
    The fields on the Add Global Breakpoint-Variable Change Breakpoint dialog differ depending on the project types.

  5. Do one of the following:

    • For a batch program
      Select a variable from the Name drop-down list. The value of this variable will be tested for change at each program statement.

    • For a CICS program
      Complete the fields in the Add a Global Breakpoint dialog:

    • Name
      Specifies the variable whose value will be checked for any modification. Select a field from the drop-down list.

    • Length
      Specifies the length of the data item in the Name field that will be used to determine if a variable has changed.

    • Offset
      Specifies the offset value for the variable in the Name field.

  6. Click Finish.
    The Breakpoints view refreshes to show the new breakpoint.

Add a Variable Change Breakpoint Using the Program Listing Area

Follow these steps:

  1. Select Window, Show Views, CA InterTest™ Debug.
    The CA InterTest™ Debug view opens.

  2. Double-click the program in which you want to add breakpoints.
    The program opens in the Program Listing area.

  3. Position at the statement where the variable is defined.

  4. Right-click the ruler to the left of the line, and select Add Breakpoint. If the statement is a comment or a programming structure element (for example Procedure Division) then the breakpoint will apply to the first valid statement PRIOR to the statement being selected.
    The Breakpoints view refreshes to show the new breakpoint.