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_shmem option only works in case both processes are running on the same platform and is only available on Windows.
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.
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
Online workshop: Java EE 7 Bootstrap