Preparation for Remote Debugging
1. Add the compiler option -d or -dx to your COMOPT in order to be able to debug this program after compilation.
-d is used to include the debug information. An additional class file is generated to store the debug information. The resulting classes don’t include the source code. Source files must be available to the debugger during the debug session.
-dx enables extended debugger functions. This option implies -d. In addition to the standard debugging features, all the variables in the class are generated including the ones that are not used in the program. Additionally, the literal constants that are generated during the execution and not as static fields in the generated class, are created as well.
When a program is compiled with -dx, the debugger is able to query and set all items of the program Data Division including the items that are not used in the Procedure Division. The IDE allows the source code to be changed while debugging.
With -dx the debugger is able to skip statements through the jump command. The resulting classes don’t include the source code.
Source files must be available to the debugger during the debug session.
2. Recompile the source again with the updated compile environment that includes the debug compiler options described before.
3. For remote debugging, a few parameters must also be added to the RUNOPT file:
jopaz.rundebug=2
=0 – The program starts in run mode and the remote debugger is not active.
=1 – The program starts in run mode and the runtime framework listens for connections from the remote debugger.
=2 – The program starts in debug mode and the runtime framework waits for connections from the remote debugger.
jopaz.debug.port=9998
This property specifies the port used by the remote debugger.
The default value is 9999.