开发者

Debugging a remote Java application with Eclipse as the server (Socket listen)

开发者 https://www.devze.com 2023-03-21 06:27 出处:网络
I am trying to debug a remote Java application from Eclipse, with Eclipse acting as the Server as opposed acting as a Client to the remote application. I launch the remote application with the followi

I am trying to debug a remote Java application from Eclipse, with Eclipse acting as the Server as opposed acting as a Client to the remote application. I launch the remote application with the following JVM options where 'server=n' will cause the remote application to connect back to Eclipse (Socket Listen) instead of Eclipse connecting to the remote app (Socket Attach).

-Xdebug -Xrunjdwp:transport=dt_socket,server=n,suspend=n,address=8000

Finally, I configure Eclipse to listen on a port and then launch the remote app. The app connects to Eclipse and my breakpoints are hit. However, when I launch a second instance of the remote app wit开发者_开发知识库h the above JVM options, the app fails with the following error indicating it was unable to connect to Eclipse.

ERROR: transport error 202: connect failed: Connection refused 

Is there a known issue in Eclipses' remote debugging that limits only one remote app to connect to it at a given time?

Thanks for any insights.


To debug a second instance of the application, you'd have to start the second instance with a different port address (other than 8000) and reference that new port number when you start the debug session.


Yes, there is an option in the Run Configurations->Remote Java Application.

Debugging a remote Java application with Eclipse as the server (Socket listen)

0

精彩评论

暂无评论...
验证码 换一张
取 消