Remote Debugging
isCOBOL’s Debugger can be used in remote debugging scenarios, a benefit in these situations when you want to debug:
• to debug a servlet or a web service running under Tomcat or other servlet container,
• to debug a COBOL program running via webclient,
• to debug a COBOL program that is called by foreign languages like C or Java,
• to debug a program with character-based interface managed by CHARVA,
• to debug a remote program running in the isCOBOL Server.
Here are the basic steps to activating the remote debugger to debug a program in one of the above situations.
1. Compile the program(s) to be debugged with either
-d option or
-dx option.
iscobol.rundebug=1 | The first program will start and run immediately. The remote debug session waits and listens for a program that is compiled for debug to launch, connecting to the program when it detects it. This is useful when you only want to debug some of your application’s programs. |
iscobol.rundebug=2 | The runtime framework will start in debug mode, pausing to connect to a remote debugger before running the program. This is useful when all your programs are compiled for debug and you want to start your remote debugger at the very first line of the application. |
3. Start the remote debugger session on your desktop.
To start a remote debugging session, the isCOBOL Debugger needs to know the host name of the machine running the program to be debugged and the port number dedicated to the debugger connection. Use the following command:
iscrun [ -d ] -r [ [ HostName ] Port ] |
When running on Windows, the following command can also be used:
isrun [ -d ] -r [ [ HostName ] Port ] |
• The -d option can be omitted when -r is used.
• If HostName is omitted, then localhost is assumed.
• If Port is omitted, then 9999 is assumed.
Note - The debugger listens and runs on the TCP/IP port 9999. A different port number can be set via the the
iscobol.debug.port configuration property.
Note - In thin client environment you don’t need to use the remote debugger. You can debug the isCOBOL Server activity by running the isCOBOL Client with the -d option as explained in
Usage of isCOBOL Client, Format 6.