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
Web Apps, SPA, PWA with vanilla Java Script (ES 6+), CSS 3 and WebStandards only. As simple as possible, but not simpler. See you at: (Progressive) Web apps, Single Page Apps and WebStandards airhacks workshops at MUC airport, Winter Edition
airhacks.fm the podcast:
Stay in touch: airhacks.news.