Getting started debugging a z/OS application with the debugger

Instructions that help you quickly get started debugging a z/OS application with the debugger. The instructions describe how to choose a z/OS application for this task, setting the daemon to the correct IP address and port number, verifying that the daemon is listening, modifying the correct options of TEST runtime parameter, starting the application, and then completing a few simple debugging steps. After completing these steps, you can learn more about modifications you might need to make to these steps to debug other z/OS applications.

About this task

The instructions in this topic help you get started debugging one of your z/OS applications.

Procedure

Do the following steps to get started debugging an application on your z/OS system:

  1. Choose an application that you can debug currently with Debug Tool and that you know how to modify the TEST runtime parameter associated with this application. With a few exceptions, you can debug most COBOL, PL/I, C/C++, and assembler programs running in IMS™, CICS®, or DB2®. The topic "Debug Tool: overview" in the Debug Tool User's Guide gives a complete list of the types of programs you can debug with the debugger (known as remote debugger or remote debug mode in the Debug Tool User's Guide) and the subsystems the debugger supports.
  2. Obtain the IP address of your workstation. You can obtain the IP address by doing the following steps:
    1. Open a Command Prompt window and enter the command ipconfig. The window displays a list of IP addresses. The correct IP address is labeled IP address and is in the format www.xxx.yyy.zzz. If you see more than one IP address, one IP address might be for a network device, like a router or wireless hub, and the other is for your workstation. Use the IP address for your workstation. Make a note of this IP address.
    2. Enter the exit command to close the window.
  3. In the debugger, verify that the daemon is listening by doing the following steps:
    1. Click Window > Open perspective.
    2. Click Debug.
    3. Click OK.
    4. In the Debug view, locate the listener icon on the right side of the Debug view. The listener icon is green (Icon indicating that listening is on) if the listener daemon is on, red (Icon indicating that listening is off) if the listener daemon is off.
    5. If the icon is red, click the icon to turn on the listener daemon. The icon turns green.
  4. Modify the TEST runtime option for your application to replace the existing MFI or VTAM% option with the TCPIP& option, or update the existing TCPIP& option.

    If you are replacing an existing MFI or VTAM% option, remember that the format of the TCPIP& option is TCPIP&tcpip_workstation_id%port_id, where you replace tcpip_workstation_id with the TCP/IP address you obtained from step 2. The default port ID is 8001; if the daemon shows a different port number, replace port_id with that port number.

    If you are updating the existing TCPIP& option, verify that you specify the IP address you obtained from step 2. The default port ID is 8001; if the daemon shows a different port number, replace port_id with that port number.

    If you are using CADP for CICS programs, remember to set your display device correctly; in particular, set Session Type to TCP.

    If you are using DTCN for CICS programs, remember to Session Type to TCP.

    If you are specifying the IP address for DB2 stored procedures, remember to follow the instructions in topic "Preparing a DB2 stored procedures program" in Debug Tool User's Guide.

    You can view examples how the TEST runtime option might change in "What to do next" .

  5. Start your application as you normally do when you are debugging it. Information pertaining to your application appears in the Debug view. If you do not see information about your application in the Debug view, check the following items:
    • You obtained the correct IP address and port number for your workstation.
    • You specified the correct TEST runtime option, including the correct IP address and port number.
    • Verify that the daemon is listening.
  6. Step through your program, set a breakpoint, run your program to the breakpoint, and monitor a variable in your application. The following instructions show you how to do each of these tasks:
    • To step through your program, click on the Step into button (Icon for the Step into action).
    • To set a breakpoint, go to the debugger editor, right-click the statement on which you want to set a breakpoint and select Add breakpoint.
    • To run your program to a breakpoint that you set, click Resume Icon for the Resume action.
    • To monitor a variable, go to the debugger editor and right-click the variable you want to monitor. Select Monitor Expression from the pop-up menu.
  7. To end your debugging session, click on the Terminate button (Icon for the Terminate action) in the Debug view. This icon is located on the right side of the Debug view.

What to do next

To learn about the debugger's features, read the online help by doing the following steps:
  1. Click Help > Help Contents.
  2. Expand Developing > Debugging COBOL, PL/I, Assembler, and C++ programs > Compiled language debugger.

To learn more about the TEST runtime option, read the topic "Syntax of the TEST run-time option" in Debug Tool Reference and Messages, GC27-3624. The following table highlights the changes you make to the TEST runtime option for different situations:

Table 1. Examples of changes to TEST runtime option to work in remote debug mode.
Previous After
TEST(ALL,,,MFI:)

Indicates that you want Debug Tool to start a debug session in full-screen mode.

TEST(,,,TCPIP&127.0.0.1%8001:*)

Indicates that you want to start a debug session in remote debug mode, with the remote debugger on the workstation with the TCP/IP address of 127.0.0.1 and its debug daemon listening on port ID 8001.

TEST(,,,TCPIP&abc.example.com%8000:*)

Indicates that you want to start a debug session in remote debug mode, with the remote debugger on the workstation with the TCP/IP name of abc.example.com and its debug daemon listening on port ID 8000.

TEST(,,,TCPIP&abc.example.com%8001:*)

Indicates that you want to start a debug session in remote debug mode, with the remote debugger on the workstation with the TCP/IP name of abc.example.com and its debug daemon listening on port ID 8001.

TEST(,,,TCPIP&127.0.0.1%8001:*)

Indicates that you want to start a debug session in remote debug mode, with the remote debugger on the workstation with the TCP/IP address of 127.0.0.1 and its debug daemon listening on port ID 8001.

TEST(,,,TCPIP&192.0.2.09%8001:*)

Indicates that you want to start a debug session in remote debug mode, with the remote debugger on the workstation with the TCP/IP address of 192.0.2.09 and its debug daemon listening on port ID 8001.


Feedback