Monday, June 27, 2011

Debugging a JBoss application

Recently had a chance to debug a Jboss application through eclipse. Below are the steps I did.

1. JBoss version is 6.0.0.
2. edited <JBossHome>/bin/run.conf.bat and added the below line
set "JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
3. Started jboss server and got the below print
Listening for transport dt_socket at address: 8000
4. Then in the eclipse, select the project and then Run ----> Debug Configurations-----> Remote Java Application. On the right side, select the project, and set the connection type as Standard (Socket Attach), Host as localhost and give port as 8000. Click on Debug.
5. Then select Window ----> Show View ---> Debug, you will be able to see the stack traces.
6. Most of the standalone debugging operations i.e setting a break point, adding a watch would work in remote debugging also.

No comments:

Post a Comment