1 Trust many people often encounter when a team is using remote debugging:
Failed to connect to remote VM Connection refuse
2. Cause: Other people in the same group monopolize this connection (while only one connection can perform remote debugging)
3. Solution: Click the 5th button in the figure below, "disconnect"
===== "Attached: Java Remote Debugging Configuration
1 Modifying the JBoss boot configuration
Opens the run.conf file in the Jboss_home/bin directory,
Found: #JAVA_OPTS = "$JAVA _opts-xdebug-xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"
Modify it to: java_opts= "$JAVA _opts-xdebug-xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n" where: 8787 port number for debugging ;
2 start JBoss
./run.sh-b xxx.xxx.xxx.xxx where xxx.xxx.xxx.xxx is the IP of the machine where JBoss resides;
3 new Debug Configuration
In Eclipse, open the menu "Run"-〉 "Debug ..." in the dialog box that appears, select "Remote Java Application", right click, select "New" in the pop-up menu, "Host" in the dialog box that appears Enter the JBoss server's IP (xxx.xxx.xxx.xxx), enter the port number for debugging in "Port" (8787), select "Debug" to start debugging;
4 Commissioning
In the "Debug View" that appears, open the Java source file that needs to be debugged, set the corresponding breakpoint on it;