How to enable remote debugging in JBOSS 5?

后端 未结 2 1941
悲&欢浪女
悲&欢浪女 2021-01-05 01:34

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,serve         


        
2条回答
  •  北荒
    北荒 (楼主)
    2021-01-05 02:24

    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

提交回复
热议问题