How does debugging work under the hood? This article explains the basics of JDI and JDWP and gives the JDWP packets for an example program.
PSA: The Risks of Remote JDWP Debugging
Java Debug Wire Protocol (a.k.a. JDWP) was designed for testing internally. Opening it to production is a HUGE security and stability risk…