Java: Remote Debug and javadebug
Java remote debugging
-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=5005,suspend=n
Note:
-Enable debugging in XDebug.
-Disable the default sun. tools. debug Debugger for Xnoagent. If the agent is disabled, the Attach method cannot be used for remote connection debugging. Therefore, this option is generally not used.
-Djava. compiler = NONE: Prohibit loading by JIT compiler.
-Xrunjdwp: JPDA reference execution instance for loading JDWP.
Transport is used for communication between the debugging program and the process used by the VM.
Dt_socket socket transmission.
Dt_shmem shared memory transmission, limited to Windows.
Whether the server = y/n VM needs to be executed as the debugging server.
Address = 3999 indicates the port number of the debugging server, which is used by the client to connect to the server.
Whether suspend = y/n starts the VM after the client establishes a connection.