Remote Debugging GlassFish in Eclipse

Source: Internet
Author: User
Tags glassfish

Remote debugging of Galssfish in eclipse, tracking the source code of GlassFish. 1) To establish the project

To track the source code, first create a new project in Eclipse and import the GlassFish into the project. Make sure that the code you want to follow can be compiled.

GlassFish source code can be downloaded on its website: https://glassfish.dev.java.net/

2) Set GlassFish

Set the GlassFish parameter, make sure the Asadmin command is joined to the system path.

Enter the following command in CMD

>asadmin Set Server-config.java-config.debug-enabled=true
>asadmin set server-config.java-config.debug-options= "-xdebug xrunjdwp:transport=dt_socket,server=y,suspend=n, address=9009 "

The results of the operation are shown in the following figure

3) Set Eclipse

Select 1) in the construction of the project, select Run->debug configurations

Then choose Remote Java Application-> New

Next, set the parameters, as shown in the following figure

4) Start Debug

After you set breakpoints in your code, select Debug. To run the function you need to debug, you can enter the program. As shown in the following figure.

The next step is the time you have to debug your program.

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.