The normal way to do the remote debug is to add the JVM argument which opens a port on the machine where the java code is running and the client eclipse is going to hook up that port on that machine.
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044
But in some cases, the server does not allow you open and connect on a new port because of the security issue, blar blar balr... There is an alternative way to do the remote debug which is open a port on the machine where eclipse is running, and let the server connect to that machine.
The JVM argument on server is
-Xdebug -Xrunjdwp:transport=dt_socket,address=142.174.39.161:6767
This tells the JVM that all debug information should be sent to 142.174.39.161:6767. The ip address is the ip of the machine where eclipse is running. In eclipse, you only need setup it listen on port 6767.
No comments:
Post a Comment