Remote Debugging for Eclipse

Source: Internet
Author: User
Tags tomcat

A few years ago, a project was organized into small modules that required each module to be a separate project that could be published separately as a Web application, and would require WebService to support other projects in the form of an API (Jar package). We chose Appfuse's webwork+. Spring+hibernate framework, because there are dependencies between each individual project in the project, we choose to use ant for compiling and copying. Then there were other colleagues involved, and he was not used to using ant to say what was wrong with Ant! And complaining about not being able to track and debug directly in Eclipse, I didn't have the experience of remote debugging in Eclipse, only to get him used to compiling with Ant.

Recently in the study Tapestry, in the <<enjoy Web Dev with tapestry>> This book found the answer:

Set two environment variables before starting tomcat.

  cd %CATALINA_HOME%/bin
  set JPDA_ADDRESS=8000
  set JPDA_TRANSPORT=dt_socket
  startup

The best way to do this is to build a bat file that reads as follows (assuming your catalina_home address is D:\tomcat-5.5.9):

Code

set JPDA_ADDRESS=8000
set JPDA_TRANSPORT=dt_socket
cd D:\tomcat-5.5.9\bin
catalina jpda start

Then select Run-->debug in Eclipse, the left side of the pop-up page select Remote Java application, and the right name fills in a project name that you need to debug remotely, Host:localhost port:8000 (these eclipse will automatically fill in for you)

Related Article

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.