Getting started with the Debug Tool plug-in for Eclipse

Describes how to obtain the information you need to make changes to the TEST runtime parameter so that you can start debugging with the Debug Tool plug-in for Eclipse.

About this task

The instructions in this topic help you verify that you have installed the Debug Tool plug-in for Eclipse (debugger) correctly and get you started debugging one of your programs. If you had been using the debugger in WebSphere® Developer Debugger for System z®, Rational® Developer for zSeries®, or the IBM Distributed Debugger in VisualAge compiler products, these instructions include steps to obtain the TCP/IP address and port ID from those products. If you have not used any of those products, you can skip those steps.

Procedure

  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 any of the following methods:
    • 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 x.yy.zzz.aaa. 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. Enter the exit command to close the window.
    • If you had been using the debugger in WebSphere Developer Debugger for System z, Rational Developer for zSeries, or the IBM Distributed Debugger in VisualAge compiler products on the same workstation you installed the Debug Tool plug-in for Eclipse, you can obtain the IP address by doing the following steps in that product:
      1. Click Window > Open perspective.
      2. Click Debug.
      3. In the Debug view, click the small, black arrow to the right of the listener icon (Icon for listener button).
      4. Select Get Workstation IP...
      5. Make a note of the IP address.
  3. If you had been using the debugger in WebSphere Developer Debugger for System z, Rational Developer for zSeries, or the IBM Distributed Debugger in VisualAge compiler products, obtain the port ID by doing the following steps in that product:
    1. Click Window > Preferences > Run/Debug.
    2. Select Debug Daemon. Make note of the port ID.
  4. In CICS Explorer, verify that the debug 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 the listener daemon on. The icon turns green.
  5. Modify the TEST runtime parameter 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. If the port ID you obtained from step 3 is different than 8001, replace port_id with that value.

    If you are updating the existing TCPIP& option, verify that you specify the IP address you obtained from step 2 and the port ID you obtained from step 3.

    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 TEST runtime string might change in "What to do next" .

  6. 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 parameters, including the correct IP address and port number.
    • Verify that the debug daemon is listening.
  7. 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 Memory > <rendering> from the pop-up menu, where rendering is the rendering that you want to display in the Renderings portion of the Memory view.
  8. 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. In the IBM® CICS Explorer™ window, click Help > Help Contents.
  2. Expand Debug Tool plug-in for Eclipse twice.

To learn more about the TEST runtime parameter, read the topic "Syntax of the TEST run-time option" in the Debug Tool Reference and Messages. The following tables show examples that highlight the differences when you change the TEST runtime.

Table 1. Examples of changes to TEST runtime parameter 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