Top
NetCOBOL V11.0 NetCOBOL Studio User's Guide
FUJITSU Software

9.6.1 Normal Debug

This section explains the procedures for starting normal debugging, including starting the remote debugger connector on the server, and starting the remote debugger.

9.6.1.1 Starting the remote debugger connector on the server

To perform remote debugging, the remote debugger connector, which monitors instructions from the debugger on a client, must be started on the server first. Start the remote debugger connector from the server-side "NetCOBOL Command Prompt".

Use the following command format to start the remote debugger connector on the server.

Server

Start command

Windows (Itanium)

cobrds64[ [ port-specification] [connection-limitation-specification] ]

Windows (64)

Solaris

svdrds[ [ port-specification] [connection-limitation-specification] ]

Linux (Itanium)

Linux (64)

Note

  • If you have to specify an environment variable for the program you want to debug, set this before you start the remote debugger connector.

  • If you have to start each program that you want to debug in a different environment, you have to run the remote debugger connector in each environment. Like the environment variable, the environment here determines the operation when the remote debugger connector is started, and its settings cannot be modified later.

  • Since the remote debugger connector on the server does not exit automatically when the debugger exits, end the connection when remote debugging ends. To end the remote debugger connection on the server, press the Ctrl + C keys in the command input window from which the remote debugger connection was started.

  • If you have to start each program that you want to debug in a different environment, or if several developers debug at the same time, specify -p when the remote debugger connector starts, and then use a different port.

Example

Examples of starting the Windows(64) server remote debugger connector

  • Several developers debug at the same time

    cobrds64  -p 10001  -h client-1
    cobrds64  -p 10002  -h client-2
    cobrds64  -p 10003  -h client-3
    • This is the case when three developers use the remote debugger at the same time.

    • Choose the port number to be used by each developer and specify this using -p.

    • Specify -h to accept only the specific computer's request for remote debugging and to reject incorrect connections by other developers.

Format of the connect restriction file

Specify the format of the connect restriction file as shown below:

 [ ALLOW={ ALL | connection-target [connection-target ...] } ]
[ DENY={ ALL | connection-target [connection-target ...] } ]

The connection target format is shown below.

Table 9.3 Connection target format (IPv4)

Format

Example

Example of IP address application range

IP address

192.168.0.1

192.168.0.1

Range

192.168.0.1-192.168.0.10

192.168.0.1 to 192.168.0.10

Wildcard (*1)

192.168.0.*

192.168.0.0 to 192.168.0.255

Host name (*2)

Hostname

192.168.0.1

*1: You can specify "*" instead of the decimal parts (8-bit) delimited by "."

*2: This example assumes that a host name called "Hostname" has been assigned for an IP address of 192.168.0.1.

Table 9.4 Connection target format (IPv6))

Format

Example

Example of IP address application range

IP address

fe80::1:23:456:789a

fe80::1:23:456:789a

Range

fe80::1:23:456:1-fe80::1:23:456:789a

fe80::1:23:456:1 to fe80::1:23:456:789a

Wildcard (*3)

fe80::1:23:*:789a

fe80::1:23:0:789a to fe80::1:23:ffff:789a

Host name (*4)

Hostname

fe80::1:23:456:789a

*3: You can specify "*" instead of the hexadecimal parts (16-bit) delimited by ":"

*4: This example assumes that a host name called "Hostname" has been assigned for an IP address of fe80::1:23:456:789a.

Note

If there is an error in the contents of the connect restriction file, the specified details will be invalid, and connection will be allowed from all computers.

Windows firewall

If the server-side OS is Windows(Itanium) or Windows(x64), the remote debugger connector cannot be used if the "Windows firewall" is enabled. Therefore, use the"9.3.3 Exception registration of Windows firewalll" register "cobrds64.exe" as a Windows firewall check exception:

9.6.1.2 Starting the remote debugger

To start the remote debugger:

  1. Select a COBOL project from the "Dependency" or "Structure" view.

  2. Select "Run" > "Debug Configurations..." from the menu bar, or click of on the toolbar and select "Debug Configurations...". The "Debug Configurations" dialog box appears.

  3. Select "Remote COBOL Application" in the left pane.

  4. Click at the top of the left pane. The startup configuration settings page is displayed in the right pane.

  5. The default startup configuration name is displayed in the "Name" field. The startup configuration name can be changed.

  6. Click the "Main" tab, check each setting item, and change it as necessary.

    item

    Description

    Project name

    The selected project name is displayed.

    Debug Style

    Select Normal Debug.

    Server name

    The server name that is set in the project properties is displayed.

    Port number

    Specify the port number used for communication with the server during debugging. Specify the same port number as that specified when the remote debugger connector started on the server. The initial setting value of the remote debugger connector on the server is 59998.

    Executable file

    Specify the executable file to be debugged. The initial setting value is either of the following, depending on whether there is a makefile:

    • With a created makefile: Target name specified in the makefile

    • Without a created makefile: Target name of the project

    If the debug target is a dynamic link library, specify the target file.

    Workspace Directory

    Specify the work directory of the application to be debugged. The initial setting value is the directory of the executable file.

    Argument(s)

    Specify program arguments in the format used for the command line interface.

  7. Start debugging by selecting "Debug". Once debugging is started with a particular configuration, the startup configuration is registered as a shortcut in the toolbar and you can restart debugging by selecting "Run" > "Debug History" or using the shortcut.

Note

If no information for remote development is set in the project, "Normal Debug" cannot be selected for "Debug Style".

Point

The debugger can be started with the default settings by selecting the project in the Dependency or Structure view, and then selecting "Run" > "Debug As" > "Remote COBOL Application" from the menu bar.