How to enable remote debugging in JBOSS 5?

淺唱寂寞╮ 提交于 2019-12-19 02:01:10

问题


How do you enable remote debugging in JBoss 5? The usual line from JBoss 4:

set JAVA_OPTS= -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n %JAVA_OPTS%

As can be found in other answers like this do not seem to work. The server never suspends. Googling "jboss 5 remote debug" doesn't bring up anything in the JBoss docs. Did something change from JBoss 4? How can I remotely debug my JBoss 5 server from eclipse?


回答1:


You have suspend=n in your options. Change this to suspend=y.

Or is the line you posted not the one you're using with JBoss?




回答2:


We have to do 2 changes to debug remote java application that is running in JBoss

  1. Configure in JBoss
  2. Creating remote debugger in in eclipse

    1. Open run.conf.bat(windows) or run.conf(Linux) file in JBoss bin folder.

go to the below lines

`# Sample JPDA settings for remote socket debugging`
 #JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n

and remove hash in JAVA_OPTS

# Sample JPDA settings for remote socket debugging
JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y

Restart the server if it is started.
2. In Eclipse, Run -> Debug configuration -> Remote Java Application and create a new. Note that you have to give port that is mentioned in run.conf.bat file



来源:https://stackoverflow.com/questions/3534384/how-to-enable-remote-debugging-in-jboss-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!