Jetty remote Debugging settings under Windows
1. First of all, the jetty under Windows is started by command Java-jar Start.jar, so if you want to set it to remote Debugging mode, use command Java-xdebug-xrunjdwp:transport=dt_socket instead. Address=10001,server=y,suspend=n-jar Start.jar to start, where the address in the command is the debug port number.
Configure remote debugging for jetty under Linux:
1. If Linux is also using the command Java-jar Start.jar to start the service, the command to start the service is changed to Nohup java-xdebug-xrunjdwp:transport=dt_socket,address=10001 , Server=y,suspend=n-jar Start.jar. The same address refers to the open debug port.
2, if the use of Linux under the command to start the service with ${jettyhome}bin/jetty.sh, you need to find the same write java_options in jetty.sh the next line to join:
java_options+= ("-xdebug-xrunjdwp:transport=dt_socket,address=10000,server=y,suspend=n")
The same address is a port and can be modified by itself.
After startup,
In the local eclipse---> Debug as---> Debug Configurations--> Remote Java application--right-click New---> Open window Setting the remote service to debug in the page
The options on the Connect tab are configured as follows:
Project selects the local project, which needs to ensure that the local engineering code and the server are the same. Otherwise, the number of rows will not be debugged.
Host enter the IP address of the server
Port to fill in the JDPW ports, as configured above is 10000
then click Debug. will appear to run. If a failed to connect to remote VM is found. Connection refused. Need to reboot jetty
The above have been tested by me to be feasible
Please refer to the link:
http://blog.csdn.net/arsenal04/article/details/40867327
Jetty remote debugging settings under Eclipse