4
votes

The web app I'm trying to debug only exhibits a bug on a particular Glassfish server, so I want to debug the web app remotely. But the web app was developed in Eclipse for Java SE and I can't see how to do that.

I have:

  1. Installed Eclipse 3.7 for Java EE
  2. Installed the Glassfish adapter
  3. Configured the server for secure login and JPDA debugging
  4. Added the server as a server in Eclipse

However, I do not see "Run on server" or "Debug on server" in the Run menu of Eclipse. If do Debug as, I can create a new Glassfish configuration but I can't select a server, so I can't configure the configuration.

1
It seems that the Glassfish adapter for Eclipse is quite buggy. - Robin Green

1 Answers

5
votes

For Glassfish 3:

First enable debugging in the Glassfish administration console (Application Server -> JVM Settings -> General -> Debug Options) which require restarting the domain. Make a note of the port number.

Then you can attach to the Glassfish debug port like any other debug session, with a "Remote Java Application" in the debug configurations.