Remote debugging of galssfish in eclipseSource codeConduct tracking and investigation.
1) establish a project
To track and view the sourceCodeFirst, create a new project in eclipse and import glassfish to the project. Make sure that the code to be followed can be compiled.
Glassfish source code can be downloaded on its official website: https://glassfish.dev.java.net/
2) Set glassfish
Set the glassfish parameter. Make sure that the asadmin command has been added 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" |
Shows the running result.
3) set eclipse
Select 1) projects in the project list, and select Run-> debug deployments
Then select remote Java application-> New
Next, set the parameters, as shown in
4) Start debug
After you set a breakpoint in the code, select debug. Run the function you need to debug to enterProgram. As shown in.
The next step is the time for you to debug the program.