Can't setup remote debugging with JBoss Web 2.1.4 windows and eclipse

525 views Asked by At

I'm unable to find an option to setup remote debugging in JBossWeb 2.1.4 on Windows. It is not installed as a service and there are no .bat scripts where I can edit the JAVA_OPTS environment variable to include:

-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4142

The only thing in the jboss web bin directory are jbossweb.exe files.

I've tried editing the run configuration in eclipse to start the container by running jbossweb.exe and setting the environment variable JAVA_OPTS to the above, but it doesn't listen on port 4142 on startup (ie, there seems to be no effect in adding the environment variable to the run configuration).

Any ideas here?

2

There are 2 answers

0
Alexander Torstling On

If you control the server from eclipse with for instance JBoss Tools, you can just click "debug" instead of "start" in the Server pane in order to start up in debug mode.

0
Rorick On

You can create such bat script by yourself. Just add jboss.bat file to bin subdirectory of JBoss install directory and put there:

java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4142 -jar "D:\JBoss.org\JBoss Web 2.1\bin\bootstrap.jar" start

When you run this script, you will get JBoss running in debug mode. Probably, it won't help you in all situations, but it worked for me.