The Java EE 6 Tutorial

Using a Debugger

The GlassFish Server supports the Java Platform Debugger Architecture (JPDA). With JPDA, you can configure the GlassFish Server to communicate debugging information using a socket.

ProcedureTo Debug an Application Using a Debugger

  1. Enable debugging in the GlassFish Server using the Administration Console:

    1. Expand the Configuration node.

    2. Select the JVM Settings node. The default debug options are set to:


      -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009

      As you can see, the default debugger socket port is 9009. You can change it to a port not in use by the GlassFish Server or another service.

    3. Select the Debug Enabled check box.

    4. Click the Save button.

  2. Stop the GlassFish Server and then restart it.