Title: RE: [JBoss-user] (remote) debugging of servlet

Sven,

The remote debugging is a feature of java and the -Xdebug is passed to the command line to java that starts JBoss. To do this I create an environment variable called DEBUG which I can then just include on the start-up command when required. See below.

set DEBUG=-Xdebug -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=33284,suspend=n,server=y
java %DEBUG% %JAXP% -classpath "%JBOSS_CLASSPATH%" org.jboss.Main tomcat

This will start the java virtual machine with remote debugging enabled and the application running. If you want to pause the application immediately change the suspend=n to suspend=y.

Then all you have to do in the IDE of your choice is attach to the VM. If you use Net Beans open source IDE follow these instructions.

1. Start JBoss with the debug enabled.
2. In Netbeans select the menu item Debug> Attach
3. In the Dialog box change from 'JDK 1.1 debugger implementation' to 'Default Debugger (JPDA)'
4. Change the connector to 'SocketAttach'
5. Set the host to the host JBoss is running on (or localhost for the same machine)
6. Set the port to the same as the address parameter set above if you copy above exactly it should be 33284 (0800-DEBUG get it!)

7. The debugger is now running, set any break points or watches you need.

Remember this if you are debugging your source code you will need to use the -g option on javac to store the local variable information in your class files to be able to set watches on the local variables.

Happy debugging,
Paul

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Scheil, Sven
Sent: 09 August 2001 11:06
To: '[EMAIL PROTECTED]'
Subject: [JBoss-user] (remote) debugging of servlet


hi,

i'm using apache and jboss2.4.0/Tomcat3.2.2 and would like to know how to
configure Tomcat for (remote) debugging. i know, i have to set
-Xdebug-parameter, but don't know where. may in the jboss.jcml???

i want to debug my servlet from kawa.

thanx
sven

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to