Remote debug code with Eclipse (GO)

Source: Internet
Author: User

From: http://blog.csdn.net/fyq891014/article/details/7534711

First of all, you need to have and deploy on the remote server to the project on the local eclipse, or debug will occur when the code line dislocation, difficult to achieve the effect of Debug. For example, if your local code adds lines, modifies, or cuts a line. While the project on the remote server does not change, the debug will find that the line number is wrong, or debug the value of the deviation, and so on.

1. Open Eclipse, click the Debug button in the upper left corner,


2. Click on the Red area



3. Double-click the red area


4.Project: Select the project you want to debug, Host: Enter your remote ip,port: Remote Call port. How to know the remote port by entering the command line of your remote virtual machine, entering the JPS-V command to find this line
-xrunjdwp:transport=dt_socket,server=y,address=52002,suspend=n
52002 is the calling interface for your remote virtual machine. If not, it is because your remote virtual machine tomacat or JBoss configuration does not support remote debugging, you need to add the following startup parameters to the JVM:
-xdebug-xrunjdwp:transport=dt_socket,address=52002,server=y,suspend=n
Adderss is your own set.

Set java_opts=-xdebug-xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n%JAVA_OPTS%


5. After everything is set up, click the Debug button in the lower right corner and you will be able to debug remotely like a local debug.

The PS:JPS (Java Virtual machine process Status Tool) is a command that JDK 1.5 provides to show all current Java process PID, and is simple and practical, ideal for linux/ Simple view of the current Java process on the UNIX platform.

Remote debug code with Eclipse (GO)

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.