开发者

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

开发者 https://www.devze.com 2022-12-25 17:51 出处:网络
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

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 ru开发者_JS百科nning 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?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消