Using Eclipse remote debugging under Linux

Source: Internet
Author: User

1 Open Port
Modify/apache-tomcat-7.0.40/bin/catalina.sh
In the appropriate position (please make your own judgment, as long as the java_opts can be set before and after the setting) Insert the following settings:
ui_debug= "-server-xdebug-xnoagent-djava.compiler=none-xrunjdwp:transport=dt_socket,server=y,suspend=n, address=8899"
catalina_opts= "$CATALINA _opts $UI _debug"
java_opts= "-server-xms4096m-xmx6144m"
Restart Tomcat when the modifications are complete and use the PS command to check that the ports are open.
[Email protected] bin]# Ps-ef | grep Tomcat
Root 27586 1 0 10:26 pts/1 00:01:33/usr/java/jdk1.7.0_40//bin/java-dnop-djava.util.logging.manager= Org.apache.juli.classloaderlogmanager-server-xms4096m-xmx6144m-server-xdebug-xnoagent-djava.compiler=none- Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8899-djava.endorsed.dirs=/var/myweb/apache-tomcat-7.0.40/endorsed-classpath/var/myweb/apache-tomcat-7.0.40/bin/ bootstrap.jar:/var/myweb/apache-tomcat-7.0.40/bin/tomcat-juli.jar-dcatalina.base=/var/myweb/ apache-tomcat-7.0.40-dcatalina.home=/var/myweb/apache-tomcat-7.0.40-djava.io.tmpdir=/var/myweb/ Apache-tomcat-7.0.40/temp org.apache.catalina.startup.Bootstrap Start

2 Configuring the Eclipse Remote debugging port

3 Click the Debug button, and Eclipse will be able to attach to the remote JVM for remote debugging.
Note: Before debugging, be aware that synchronizing local and remote Java classes files will cause problems where lines of code do not map correctly.

Java remote Debugging is very useful, compared to Java, the Eclipse CDT for C + + Remote Call support is poor, deployment is difficult.

Using Eclipse remote debugging under Linux

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.