08 November 2008

Debugging in JBoss 4.2.x onwards using Netbeans 6.5 RC2 Plus

In this post let us discuss how to attach a Netbeans 6.5 RC2 plus debugger JBoss server 4.2.x plus.

First let us enable remote debugging in JBoss. Navigate to run.bat (under bin folder) and uncomment the highlighted line by removing rem

rem JPDA options. Uncomment and modify as appropriate to enable remote debugging.
rem set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS%


Now start JBoss and JBoss will wait for the debugger instance to get attached after printing the below line.
Listening for transport dt_socket at address: 8787


Now in NetBeans menu choose Debug --> Attach Debugger as in the screen shot below.











In the popup window, select values as below and click Ok button. Thats it ..have a happy debugging