Tomcat remote debugging method under Eclipse environment

Source: Internet
Author: User

Premise: The Windows environment Tomcat is started in a catalina.bat manner rather than as a Windows service (the Java configuration and JVM parameters used vary). Server segment Settings Method 1: Modify catalina_optsModify the Catalina.bat file to add:Set "Catalina_opts=-xdebug-xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"Parameter description:-xdebug: Enable debug mode
-xrunjdwp<sub-options>: Load JVM JPDA Reference Implementation Library Transport=dt_socket:socket connection, optional DT_SHMEM connect to debug server via shared memory Addre                         ss=8000: The debug server listens on the port server=y: is the server side, N is the client suspend=n : Whether the startup process is loading paused, Y is paused at startup, and the startup process is easy to debug
The above method only starts Tomcat when you set thecatalina_opts parameter, if you just want to temporarily modify it, you can execute it under the Command Line window and then execute startup. Method 2: Use jpda start command-line window input: Set jpda_address=8777 (Debug port)
Catalina.bat JPDA Start
Start Tomcat to start debugging; You can save the above command as a bat file, and then open it directly when you want to debug.
Client SettingsEclipse Menu run-"Debug config-" new remote Java application,browser engineering Source, configure IP and port. Note To ensure normal debugging, be aware of the Eclipse global Java compiler option settings:




From for notes (Wiz)

Tomcat remote debugging method under Eclipse environment

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.