Project for Eclipse remote debugging server-side Tomcat deployment

Source: Internet
Author: User

1 First server-side code is consistent with code in local eclipse to ensure normal debugging

2 Configuring Tomcat/bin/startup.bat
Add code in front: SET catalina_opts=-server-xdebug-xnoagent-djava.compiler=none-xrunjdwp:transport=dt_socket,server=y, suspend=n,address=8000
8000 is the port we are debugging remotely, which is used later. In addition, the command can not be manually wrapped (blog display may be wrapped when the actual configuration, please note).

I have copied a startup here. BAT file renamed to debug .... Bat

The 8001 here is a remote debugging port and must not be the same as the Tomcat port. Special attention here, not the same

The second step starts the Tomcat script. It's the one we've configured ourselves, like

If the top listening address 8001 is started, there is no error.

The third section configures eclipse:

Port to configure the remote debugging port we fill out, if you need to correlate the source code, and so on, click Next to Source, select the project code that needs to be associated, click on the following debug can listen to the project on the server if the local breakpoint, the request server can be

To set a breakpoint locally, the following is a request to impersonate a request server

Request

Request Server:

Clicking Send sends the request to the server because of the same local and server code. And Eclipse listens to Tomcat, communicating on both sides is OK, just like local operation debugging :

Eclipse Remote debugging server-side Tomcat deployment project

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.