What are the options of remote debugging like:-Xrunjdwp, server, suspend?

To debug an application remotely, you will have to set options like: -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4242. This allows remote debuggers (jdb even ships with JDK) to attach to a running Java process.

There are two flavors of transports: dt_socket and dt_shmem. The dt_shmem option only works in case both processes are running on the same platform and is only available on Windows.

With suspend=y the Java-process will wait until the debugger connects, with suspend=n you will be also able to debug the application servers startup process.

The option server=y opens a socket and listens for incoming debugger requests. With server=n the debugged application will try to connect actively to a debugger and run therefore as a client.

So there is no black magic involved in debugging application servers. As long they are implemented in Java, you will be always able to debug them. Even without any fancy tools.

See "official" list of all available remote debugging options: http://docs.oracle.com/javase/1.5.0/docs/guide/jpda/conninv.html

See you at Java EE Workshops at MUC Airport or on demand and in a location very near you: airhacks.io!


SAP NetWeaver Cloud is based on Tomcat EE so it is no big deal to get it Java EE 6.

But their own SAP NetWeaver Java Application Server (one of the first fully certified Java EE 5 Servers at all) is still pure Java EE 5. No information available if it will ever get Java EE 6 or keep (and die?) as Java EE 5.

Posted by Rolf Paulsen on January 07, 2014 at 02:43 AM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
...the last 150 posts
...the last 10 comments