Tomcat JPDA eclipse

Source: Internet
Author: User

1. Modify the file Catalina. BAT in % cataline_home %/bin.
Find this code

 

 

If not "" % 1 "" = "" JPDA "" Goto nojpda
Set JPDA = JPDA
If not "% jpda_transport %" = "" Goto gotjpdatransport
Set jpda_transport = dt_shmem
: Gotjpdatransport
If not "% jpda_address %" = "" Goto gotjpdaaddress
Set jpda_address = jdbconn
: Gotjpdaaddress
If not "% jpda_suspend %" = "" Goto gotjpdasuspend
Set jpda_suspend = N
: Gotjpdasuspend
If not "% jpda_opts %" = "" Goto gotjpdaopts
Set jpda_opts =-xdebug-xrunjdwp: Transport = % jpda_transport %, address = % jpda_address %, Server = Y, suspend = % jpda_suspend %
: Gotjpdaopts
Shift
: Nojpda

 

Modify the red part,

Set jpda_transport = dt_socket

Set jpda_address = 8787

Note: dt_shmem indicates the local machine; dt_socket indicates remote debugging.

2. Modify the file startup. BAT in % cataline_home %/bin.

Find this code

Call "% executable %" start % cmd_line_args %

Change

Call "% executable %" JPDA start % cmd_line_args %

3. Set the debugging environment in eclipse

In eclipse, select rundebug. In the displayed dialog box, right-click Remote Java application to create a remote debugging item.

Select the project to be debugged in "project", and enter the IP address of the project to be remotely debugged in "host", that is, the IP address of Tomcat, enter the set port number in "Port", for example, the port number set above 8787, and then select "allow termination of remote VM". The connection type does not need to be modified. Click Apply and then debug. Start debugging.

 

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.