Remote debugging idea jar package summary

There are two models presented here it is a way to pass my test (attach to remote JVM)

 

A first start jar specify a listening port, start a command as follows:

java -Xdebug -Xrunjdwp: transport = dt_socket, address = port number, server = y, suspend = y -jar jar package name

E.g:  

java -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=y -jar test.jar

 

This prompt: Listening for transport dt_socket at address: 5005 Description operation is successful, the next operation starts to open IDEA

Second, open the idea

Create a "Remote" to perform the configuration:
 
If this is a remote debugging jar remote IP address

 

 

Because your Jar file has been executed, so you can directly start debug:
such
or
 
 

If the following error occurs, it is because the first step is not performed jar package
Unable to open debgger port(localhost:5005):java.net.ConnectException"Connection refused:connect"
 
This appears to indicate success, then you can break point debugging, and running locally as break points to keep the consistency native code and the code jar, otherwise invalid breakpoint happens

 

 

 

 

Guess you like

Origin www.cnblogs.com/Sincerity/p/11468390.html