Remote debugging with IntelliJ idea

Source: Internet
Author: User

The remote debugging server is a useful technique so that we can quickly locate problems on the line. This article describes how to debug remotely in IntelliJ idea.


Configure IntelliJ idea


Select the edit configurations-->+ number (Add New Configuration)--Remote, as follows:

where host fills in the IP address of the remote server, 8000 is the port for remote debugging.


Server Configuration


Add the following configuration to the setenv.sh in the bin directory of the server Tomcat:     

Catalina_opts= "${catalina_opts}-agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=n"

The first step in the IntelliJ idea configuration is command line arguments for running remote JVM.


Start Remote Debugging

?

after adding breakpoints to the source code, click the Debug button


the Debug window outputs the following content

indicates a successful connection to the remote server and can begin debugging.

Remote debugging with IntelliJ idea

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.