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) |
Port Format:
-p port number
For the port number, specify the same value detailed in NetCOBOL Studio Starting the remote debugger.
Specify a port number in the range 1024 to 65535. If omitted, it defaults to 59998.
Connect restriction format:
-h host name | -s connect restriction file name [ -e ]
Specify a host name or an IP address to allow connection.
Specify the connect restriction file.
The processing result of the contents of the specified connect restriction file are displayed.
If -s and -h are both omitted, connection will be allowed from all computers.
After the remote debugger connector is started, the IP address and port number are displayed, and orders from the client to start debugging are monitored.
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 ...] } ]
This allows connection from the connection target specified in ALLOW. If this is omitted, it is assumed that ALL has been specified.
This denies connection from the connection target specified in DENY. If this is omitted, it is assumed that ALL has been specified.
If you specify ALL, connection is allowed or denied from all computers.
If ALLOW and DENY are both specified, and ALLOW is described, ALLOW has priority.
If this is register on several lines, write "\" at the end of the line.
Example
ALLOW=192.168.0.1 192.168.0.3 \ 192.168.0.8-192.168.0.10
The connection target format is shown below.
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.
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:
To start the remote debugger:
Select a COBOL project from the "Dependency" or "Structure" view.
Select "Run" > "Debug Configurations..." from the menu bar, or click of on the toolbar and select "Debug Configurations...". The "Debug Configurations" dialog box appears.
Select "Remote COBOL Application" in the left pane.
Click at the top of the left pane. The startup configuration settings page is displayed in the right pane.
The default startup configuration name is displayed in the "Name" field. The startup configuration name can be changed.
Click the "Main" tab, check each setting item, and change it as necessary.
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.