I really like the remote debugging facilities of the JVM. But I wonder how it works internally.
My assumption: It is done through a JVM feature where the running process is downloading/using the source-code from the attached remote-debugger (like IDE) It knows the line of the current stack-trace and then can jump to the respective IDE breakpoint. The communication of stack-trace and introspection of the application state is then done either through sockets or shared-memory (setting of remote debugger).
Has anybody interesting links/resources on that?
The debugging features of the JVM are provided via the Java Platform Debugger Architecture (JPDA).
The JPDA itself is composed of the following:
The diagram listed in the JPDA architecture structure is a good starting point. Additional places to look for would be the guides listed in the JPDA page.