Add remote debugging port to linux server

 

In many cases, our code needs to be debugged on the linux server, but how to solve the problem of debugging the code on the server on the local eclipse?

 

To solve this problem, we need to increase the debugging port on our server, and then add remote debugging on eclipse!

 

First add the remote debugging port of the server, we need to find the tomacat/bin/startup.sh of the server , and then edit the startup script and add the following code, here is an example of adding the 8788 debugging port:

 

declare -x CATALINA_OPTS="-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8788"

 

Finally, open the debug confiurations of eclipse, add the remote server IP and the remote debugging port we added!

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326960096&siteId=291194637