To run H-Sphere in debug mode:-
1. Compile classes with debug information:
./configure -javac –with-params=”-g”
make shiva
2. Set the following option “on” in jserv.conf to be able to launch JServ manually:
ApJServManual on
3. Create debug.sh shell script to run JServ in debug mode:
#!/bin/sh
properties=/home/shiva/apache/etc/jserv.properties
log=/home/shiva/apache/logs/jserv_manual.log
CLASSPATH=$CLASSPATH:/usr/local/java/JSDK2.0/lib/jsdk.jar
CLASSPATH=$CLASSPATH:/usr/local/apache/libexec/ApacheJServ.jar
java -Xdebug -Xrunjdwp:transport=dt_socket,address=9999,server=y ,suspend=n
org.apache.jserv.JServ $properties $1 2 >> $log
# address=9999 – port to which the debugger may be attached
# choose any available port you like
4. In IDE, set the following debug configuration:
Transport: Socket
Debuger Mode: Attach
Host: localhost
Port: 9999
5. Start Apache and run debug.sh after Apache start. Set IDE breakpoints and launch debug from IDE.
Leave a Reply
You must be logged in to post a comment.