SometimesProgramWhen running on the server, an error is reported. Apart from looking at the poor log to locate the problem, the remote debugging method can locate the problem most quickly, common application servers are Tomcat and JBoss.
Tomcat configuration:
Open the file Catalina. bat under % cataline_home %/bin and add the following line:
Set catalina_opts =-server-xdebug-xnoagent-djava. compiler = none-xrunjdwp: Transport = dt_socket, Server = Y, suspend = N, address = 8787
Address = 8787 is the unused port number. There are two Connection Methods: dt_shmem and dt_socket, which indicate local debugging and remote debugging respectively.
JBoss Configuration:
Find the run. conf file in the jboss_home/bin directory and find:
# Java_opts = "$ java_opts-xdebug-xrunjdwp: Transport = dt_socket, address = 8787, Server = Y, suspend = y"
Modify it:
Java_opts = "$ java_opts-xdebug-xrunjdwp: Transport = dt_socket, address = 8787, Server = Y, suspend = N"
After configuration, open the following view in myeclipse and enter the IP address and port number of the host where the server is located:
OK.