I. Linux tomcat configuration and startup
1.catalina.sh the first line to add
Declare-x catalina_opts= "-xdebug-xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
2. Start Jpda (This is the boot mode under Tomcat, other servers may be different, but the same is true)
./catalina.sh JPDA Start
3. Start the Web service
./start.sh
Two. In the Windows side of the MyEclipse in accordance with the configuration of Ip,port, etc.,
Then select source in the diagram, select the code directory you want to debug, and add
Then click Debug in the diagram to start the remote debugging.
Add:
Three. Technical terminology
The Java Platform Debugger Architecture (Jpda:java Platform Debug architecture) consists of a Java Virtual machine backend and a debug platform front-end
1.Java virtual machines provide Java debugging capabilities
2. The debug platform requests services from the Java Virtual machine by debugging the interactive protocol to debug programs running in the virtual machine
By default, JPDA is not started
Four. Check if the JPDA debug Port 8000 is being occupied by another process command:
Netstat-an | grep "8000" can be
If prompted:
Note:waiting for the process-to-end and use of the-force option require-$CATALINA _pid is defined
This is because there are no arguments behind catalina.sh
Finally, the JSP itself is not debug, you want to debug, try to write Java code in the. java file inside