, it basically called the log to find the bug, and if you looked at the log, you basically knew what the problem was. However, it is convenient to debug some problems, so I started to study how to debug Tomcat remotely. . . .
1. What is JPDA in tomcat's jpda service
?
JPDA (Java Platform Debugger Architecture) is the abbreviation of Java Platform Debugger Architecture. Through the API provided by JPDA, developers can easily and flexibly build Java debugging applications. JPDA mainly consists of three parts: Java Virtual Machine Tool Interface (JVMTI), Java Debug Wire Protocol (JDWP), and Java Debug Interface (JDI). The graphical interface debugging tools provided by development tools like Eclipse and IDEA actually implement JDI. For detailed information about JPDA, you can check the series of articles on developerWorks - in-depth Java debugging system
- - - - - - - - - - - - - from http://blog.csdn.net/mhmyqn/article/details/49209541
Start the jpda service in tomcat
quote
./catalina.sh jpda start
In the catalina.sh script, you can see that the default configuration of jpda is like this
if [ "$1" = "jpda" ] ; then if [ -z "$JPDA_TRANSPORT" ]; then JPDA_TRANSPORT="dt_socket" be if [ -z "$JPDA_ADDRESS" ]; then JPDA_ADDRESS="8000" be if [ -z "$JPDA_SUSPEND" ]; then JPDA_SUSPEND="n" be if [ -z "$JPDA_OPTS" ]; then JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND" be CATALINA_OPTS="$JPDA_OPTS $CATALINA_OPTS" shift be
The default port is 8000, of course, you can change it to your favorite port. Well, in fact, I don't understand these scripts at all, but I have always had a holy respect for shell scripts, so I think I will learn this magical thing this weekend.
Reference : http://www.mamicode.com/info-detail-1332614 .html
http://blog.csdn.net/idlear/article/details/51592275