Remote debugging Java applications via jetty under Eclipse __java

Source: Internet
Author: User
Tags tomcat

1. Start Jetty Server

2. Right key item in eclipse:

Debug as->debug Configurations Select the new_configuration under Remote Java application on the left, and modify name and port, as shown below (this is equivalent to the additional process in. net)

Quote this error: Failed to connect to remote VM. Connection refused.
Connection Refused:connect

Workaround: (First detect if the jetty server started successfully)

(1). Increase environment variable maven_opts:-xdebug-xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=n

(If it's tomcat, you need to find the Tomcat/bin/catalina.bat file, edit it, add the downlink code before catalina_opts.)

Set Catalina_opts=-server-xdebug-xnoagent-djava.compiler=none-xrunjdwp:transport=dt_socket,server=y,suspend=n, address=50001 "Port number for debugging")

(2). Another reason is that you are already in debug, the original turned off, you can click the icon in the red box can be

3. Access the URL address of the debug, will enter the breakpoint


This kind of launch are configured to open the debug perspective when it suspends it's asking if you want to enter a breakpoint, yes


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.