support: Customer Portal
Focused on delivering choice, investment protection and flexibility to organizations with valuable COBOL assets
 

Veryant Knowledge Base
Home > All Categories > isCOBOL Server and Thin Client > How do I debug a program running in thin client mode?
Question Title How do I debug a program running in thin client mode?
Question:

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.

Answer:

To run the remote debugger, start the isCOBOL Server with the following property:
iscobol.rundebug=1
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 
appserverdebug.sh contains the following:

#!/bin/ksh
export ISCOBOL_JDK_ROOT=/usr/java/jdk1.6.0_06
export ISCOBOL=/opt/veryant/iscobol
export CLASSPATH=$ISCOBOL/lib/iscobol.jar:$ISCOBOL/lib/jdic.jar:/MyApp/Object
export LD_LIBRARY_PATH=$ISCOBOL/native/lib:/usr/lib
$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
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
thinclient.bat contains the following:

@echo off
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.
Authored by: Veryant Support This question has been viewed 6664 times so far.
Click Here to View all the questions in isCOBOL Server and Thin Client category.
File Attachments File Attachments
There are no attachment file(s) related to this question.
How helpful was this article to you?
User Comments User Comments Add Comment
There are no user comments for this question. Be the first to post a comment. Click Here
Related Questions Related Questions
  1. In thin client mode how do I run a local external application like the Windows Calculator or Microsoft Excel?
  2. How do I set up isCOBOL Server (Application Server) and Thin Client?
  3. How do I use Java Web Start to automatically download and launch the thin client?
  4. How do I capture client side errors when using a different look and feel (e.g. Nimbus)?
  5. 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?
  6. How do I avoid having to edit the Java security policy to allow isCOBOL thin client applet to connect?
  7. How do I use secure transport (SSL) with the isCOBOL thin client?
  8. The COBOL program suddenly terminates on the server and leaves thin client running with a blank screen
  9. How do I download files from server to client using isCOBOL Thin Client?
  10. How can I get the system-information data from the client computer?
  11. What are the Java version requirements on the client and server? Do they need to match?
  12. How do I resolve the error 'Application Blocked by Java Security' working with jnlp?
  13. Is there a way to simulate users and load-test the thin client?
  14. The user name shown by the -panel is the PC Name. Is it possible have the user id of our application?
  15. How can I get the local username?
  16. Is there a way to distribute multiple client connections on different servers?
Article Information Additional Information
Article Number: 43
Created: 2009-08-31 5:05 PM
Rating: 1 Star
 
Article Options Article Options
Print Question Print this Question
Email Question Email Question to Friend
Export to Adobe PDF Export to PDF File
Export to MS Word Export to MS Word
Bookmark Article
Subscribe to Article Subscribe to Article
 
Search Knowledge Base Search Knowledge Base



 
 

© Veryant - All Rights Reserved
Veryant and isCOBOL are trademarks or registered marks of Veryant in the United States and other countries. All other marks are the property of their respective owners.