Search code examples
javadebuggingjbossremote-debuggingmyeclipse

How to debug web project in MyEclipse using JBoss server?


I am new to jboss and myeclipse. I want to debug my web app using jboss 4.0.4 I am using MyEclipse.

I gone through various links and found we need to uncomment following line in run.bat file

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

then after starting run.bat console shows

Listening for transport dt_socket at address: 8787 

Then next how do I tell MyEclipse to attach to port 8787 and run my application in debug mode.


Solution

  • You need to define a Remote Java Application in the Eclipse debug configurations:

    • Open the debug configurations (select project, then open from menu run/debug configurations)
    • Select Remote Java Application in the left tree and press "New" button
    • On the right panel select your web app project and enter 8787 in the port field.

    Here is a link to a detailed description of this process.

    When you start the remote debug configuration Eclipse will attach to the JBoss process. If successful the debug view will show the JBoss threads. There is also a disconnect icon in the toolbar/menu to stop remote debugging.