You only need to add some parameters to the Tomcat Startup File to start remote_debug in eclipse. The specific method is as follows:
In % tomcat_home % \ bin \ Catalina. add set catalina_opts =-server-xdebug-xnoagent-djava to the BAT file. compiler = none-xrunjdwp: Transport = dt_socket, Server = Y, suspend = N, address = 5888.
Open eclipse and select debug... from the eclipse run menu... add a remote_debug (remote debugging) in the tree menu on the left, and fill in the basic information. The information is: Debug name, project name, debug the host URL and port, and check before allow terminate of remote VM. the most important thing is the port information. This port information comes from the address item in the above string of parameters. You can set the address to any unused port.
Start Tomcat on the console. You can see information like "listening for transport dt_socket at address: 5888" on the console, indicating that the debug port has been listened on. Then open the previously configured debugging and enter a URL in IE or eclipse's built-in browser to run the WebProgramRemember to set a breakpoint before running the web program.
Now you can perform Web debugging in eclipse...