Windows debugging locally-launched Tomcat

Source: Internet
Author: User

We typically use eclipse for local debugging of Tomcat, but there are special cases where you need to start Tomcat directly locally (execute Startup.bat in the bin directory of Tomcat), and we can debug with a similar remote debugging mode.

First, we need to add the environment variable setting of remote debugging in Bin/catalina.bat, here we set the debug port number to 18080

Set jpda_opts=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:18080

Then open the Command Line window, go to the local Tomcat bin directory, execute Catalina JPDA start command to launch Tomcat

D:\wulinfeng\tomcat\apache-tomcat-8.5.13\bin>catalina JPDA Start

Finally, go to eclipse. Configure remote debugging: Click the green bug icon or click run-> on the bug select Debug Configurations->remote Java application-> fill in the Debug name, select the project, Host for localhost, port for 18080-> Click on the lower right corner of the debug button, the following slowly debugging it

Windows debugging locally-launched Tomcat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.