How do I debug a program running in thin client mode?
I start the isCOBOL Server and can run a program using thin client. However, I can't figure out how to debug it. Please tell me the steps required to debug in this situation.
To run the remote debugger, start the isCOBOL Server with the following property:
You can set this in a properties file or on the command line using java -Discobol.rundebug=1
Then you can run the following from UNIX (assuming you have your DISPLAY variable set correctly to point to your X server):
java com.iscobol.debugger.GraphDebugger -r localhost
The source code for the program you are debugging must be located in one of the CLASSPATH directories.
Using an X server with the debugger can sometimes be slow. Another option is to run the debugger locally on your Windows desktop. To do this, copy the source code for the program you want to debug to your local Windows machine and made sure the directory is in your Windows CLASSPATH setting. Then run the following from your Windows machine:
java com.iscobol.debugger.GraphDebugger -r hostname
where hostname is the hostname of your server machine.
The debugger is much more responsive in this mode because it is all running locally except for the network messages that occur when you step through the program.
Here are some example scripts: First start the isCOBOL Server in remote debug listener mode with:
appserverdebug.sh contains the following:
$ISCOBOL_JDK_ROOT/bin/java -Discobol.conf=/MyApp/appserver.properties -Discobol.rundebug=1 -Discobol.logfile=/MyApp/appserver.log -Discobol.tracelevel=11 com.iscobol.as.AppServerImpl -hostname 192.168.206.128
Then start the debugger on Windows with:
remotedebugger.bat contains the following:
java -Discobol.debug_code_prefix="C:\MyApp\Source;C:\MyApp\Copy" com.iscobol.debugger.GraphDebugger -r 192.168.206.128
and then run the application with thin client with:
thinclient.bat contains the following:
set CLASSPATH=%CLASSPATH%;C:\Program Files\Veryant\isCOBOL2008\lib\jdic.jar
java -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel com.iscobol.gui.client.Client -hostname 192.168.206.128 MYAPPMAIN
Note that the debugger will not break until it hits a program that has been compiled with -d.
by: Veryant Support
This question has been viewed 6600 times so far.
Here to View all the questions in isCOBOL Server and Thin Client
|There are no attachment file(s) related to this question.
| User Comments
|There are no user comments for this question. Be the first to post a comment. Click Here
| Related Questions
- In thin client mode how do I run a local external application like the Windows Calculator or Microsoft Excel?
- How do I set up isCOBOL Server (Application Server) and Thin Client?
- How do I use Java Web Start to automatically download and launch the thin client?
- How do I capture client side errors when using a different look and feel (e.g. Nimbus)?
- With thin client is there a way to update and push changes to programs live (on the fly), without having to kill and restart the isCOBOL Server?
- How do I avoid having to edit the Java security policy to allow isCOBOL thin client applet to connect?
- How do I use secure transport (SSL) with the isCOBOL thin client?
- How do I download files from server to client using isCOBOL Thin Client?
- The COBOL program suddenly terminates on the server and leaves thin client running with a blank screen
- How can I get the system-information data from the client computer?
- What are the Java version requirements on the client and server? Do they need to match?
- How do I resolve the error 'Application Blocked by Java Security' working with jnlp?
- Is there a way to simulate users and load-test the thin client?
- The user name shown by the -panel is the PC Name. Is it possible have the user id of our application?
- How can I get the local username?
- Is there a way to distribute multiple client connections on different servers?