The method of opening debug configuration and creating IDEA remote Modulation by remote Program
This article focuses on "remote programs to open debug configuration and new IDEA remote mode methods", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "remote programs to open debug configuration and new IDEA remote mode method" it!
1. Remote program opens debug configuration
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
If it is a program run by tomcat, you can add configuration parameters in the / bin/catalina.sh file (at the beginning)
Export CATALINA_OPTS= "- agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" or export JAVA_OPTS= "- agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
If it is a program run by java-jar, you can configure the environment variable.
Java-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005-jar app.jar
two。 New IDEA remote mode
3. Click the Debug button to view the port connection
Netstat-anp | grep 5005
Like the figure above, a connection has been established and you can break the point in the idea source code.
At this point, I believe you have a deeper understanding of the "remote program to open debug configuration and new IDEA remote mode", might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!