Version 3

    Monitoring a remote JBoss Server from Eclipse




    Sometimes you need to debug something running on another machine or outside of eclipse but you still want the handy debugging facilities of the IDE.  This is very simple to do and requires only one small alteration to the jboss startup script.


    1. Edit the run.bat/ file and uncomment the line "rem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS%".

    2. Start Eclipse (I'm using ver 3.1 with JBoss IDE 1.5 M2) and open your workspace.

    3. Click on the Run--->Debug... menu.

    4. Select "Remote Java Application" in the left pane and then click new.

    5. Name the configuration, fill in the IP address and the port number (this must be the same as the one defined on the server, e.g. 8787 by default).

    6. Click apply but keep the window open.

    7. Start the JBoss Server (or restart it if it's already running).  The server will block waiting for the connection from the remote client.

    8. Go back to the dialog box in eclipse and click Debug.

    9. and that's it!


    You now have eclipse debugging a remote instance of JBossAS, simple!


    NOTE: Ensure firewalls are open for comms on the specified port - e.g. Norton Internet Secuirty/Windows Firewalls etc etc....otherwise you'll waste time trying to figure out why things are not working.