Myeclipse+tomcat Debug Mode settings

Source: Internet
Author: User

1. Question:

All along, while using Myeclispe+tomcat to start Tomcat inside Eclipse, you can debug Java class code, but once DEBUG discovers that there is a problem with the code, you need to reboot the container to take effect when you modify it.

2. Resolve:

Once you have used the above version of TOMCAT5.5.XX, configure Tomcat does not reload the container because of the modification of the class. So if you just modify the implementation of the class (the code in the method body), instead of adding or removing methods and member variables for the class. Tomcat can be run directly. That is, as long as you modify the configuration of Tomcat's server.xml context, you can debug and directly modify the code in the MyEclipse without reloading your modifications to Tomcat, greatly improving the efficiency of debugging. The exact configuration is simple:

Server.xml

<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="/media" docBase="D:\temp\media"/>
<Context path="" docBase="D:\workspace\voice_internet\src\main\webapp"/>
</Host>

Key: Do not add reloadable and debug attributes to the context.

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.