Top
NetCOBOL V11.0 Debugging Guide
FUJITSU Software

2.8.2 Start procedure for remote debugging

As for normal debugging, there are three methods used to start remote debugging.

2.8.2.1 How to start remote debugging for general programs

This starts the remote debugger and starts debug for the program you want to debug.

Before you can debug a general program, you must start the remote debugger connector in the server in advance.

To operate the server computer directly, log on to the server computer. To log on to a computer on the server side, use TELNET. If the server OS is Windows, use the terminal service.

The procedure to start the remote debugger for debugging general programs is shown below:

  1. Start the remote debugger connector in the server.

    At this time, restrict the permission for connection to the computer where necessary. For details, refer to the "2.8.3.1 How to use the server remote debugger connector", and "2.8.3.5 Restricting connection to computers that allow remote debugging".

    When the remote debugger connector starts, information such as the IP address and port number are displayed, and the order from the client to start debugging is monitored.

  2. Start the remote debugger in the client.

    The methods that are generally used are as follows:

    • Solaris remote debugger: In the Project Manager window, in the Project menu, select "Remote debug".

    • Windows or Solaris remote debugger: In the Project Manager window, in the Tools menu, select "Debugger type" to select the debugger. Next, start the debugger according to one of the following methods:

    • Solaris remote debugger: Select a COBOL project in the "Structure view" or "Dependency view" of NetCOBOL Studio. Select "Remote development" from the Project menu, and then select "Debugger".

  3. Specify the required information in the Start Debugging dialog box.

    After the remote debugger starts, the debugger main window opens.

    If the Start Debugging dialog box does not appear when the debugger starts, select "Start Debugging" from the File menu of the remote debugger.

    In the Start Debugging dialog box, make entries for the application, source file storage folder, server IP address, and other necessary information for starting debugging, and then click the OK button. For details, refer to "2.8.5 Starting the Remote Debugger".

  4. Use the remote debugger to debug.

    The Start Debugging dialog box is closed, and debugging begins.

    The operation method of the remote debugger is the same as that of the ordinary debugger.

    For details, refer to "2.5.2.1 Using the Debugger".

    While the server remote debugger connector is starting, you can debug as many times as you like simply by specifying the program to debug using the remote debugger.

  5. Close the remote debugger.

    To close the remote debugger, in the File menu, select Exit.

  6. Close the server remote debugger connector.

    To close the server remote debugger, hold down the Ctrl and C keys together.

2.8.2.2 How to start remote debugging for programs that run in server environments such as Interstage

This is the way to start the remote debugger from the program you want to debug.

This start method is mainly used for remote debug for COBOL programs that run in a server environment such as Interstage and Web servers.

The start procedure is shown below:

  1. Make the settings for remote debugging.

    • Client settings

      Start the remote debugger connector in the client.

      The remote debugger connector starts with the same settings the previous time it was started, and resides in the task tray.

      Where necessary, modify the port number, and restrict the permission to connect to the computer.

      For details, refer to 2.8.3.4 How to use the client remote debugger connector", and "2.8.3.5 Restricting connection to computers that allow remote debugging".

    • Server settings

      Specify the IP address and port number of the client computer that is displayed in the client remote debugger connector, Connect information page in the environment variable @CBR_ATTACH_TOOL. For details, refer to "@CBR_ATTACH_TOOL (Invoke debugger or COBOL Error Report from application)" in the "NetCOBOL User's Guide".

      If several developers are to debug at the same time, you must specify a different IP address and port number for each developer in @CBR_ATTACH_TOOL.

      You can specify a different IP address and port number for each developer in @CBR_ATTACH_TOOL in the following cases:

      • Each developer has a special folder, and it contains the executable files or dynamic link library you want to debug and the runtime initialization file (COBOL85.CBR).

      • You specify @CBR_ATTACH_TOOL in the runtime initialization file.

      If you debug a dynamic link library that is called from a server product such as Interstage or a Web server, you must specify that on runtime initialization file that has been stored in the same folder as the dynamic link library must be referred to. For details, refer to "Using the runtime initialization file under DLL" in the "NetCOBOL User's Guide".

  2. Execute the program you want to debug.

    Execute the operation for running the COBOL program you want to debug, such as input from a Web server.

  3. Start the remote debugger in the client.

    After the remote debugger starts, the debugger main window opens in the client.

    To start debugging, in the Start Debugging dialog box, enter the required information and then click OK. For details, refer to "2.8.5 Starting the Remote Debugger".

    If you specify the start parameter in the server environment variable @CBR_ATTACH_TOOL, the contents are displayed in the Start Debugging dialog box on startup. For this reason, you do not have to specify them each time.

  4. Use the remote debugger to debug.

    The remote debugger operation is the same as for the normal debugger.

    For details, refer to "2.5.2.1 Using the Debugger".

    While the client remote debugger connector is starting, you can execute a program to debug it as many times as you like.

  5. Close the remote debugger.

    To close the remote debugger, in the File menu, select Exit.

  6. Close the client remote debugger connector.

    Right-click the icon of the remote debugger connector that resides in the task tray, and in the menu that is displayed select Exit.

If the server is Solaris, the following points are different:

2.8.2.3 How to start remote debugging using the just-in-time debugging function

This automatically starts the remote debugger for debugging the program if an application error or runtime message occurs in the program.

You can only use this start method if the server is Windows.

This start method is the same as for "2.8.2.2 How to start remote debugging for programs that run in server environments such as Interstage" except for the environment variable @CBR_JUSTINTIME_DEBUG. For details, refer to "@CBR_JUSTINTIME_DEBUG (Specify inspection using the debugger or the COBO Error Report at abnormal termination)" in the "NetCOBOL User's Guide".

If an application error or a runtime message occurs when you execute the program, the remote debugger starts up and the remote debugger main window opens. To start debugging, click OK in the Start Debugging dialog box. After debugging starts, the application error or runtime message is interrupted.