Tuesday, February 22, 2011

Linux Port forward for debug remote application

Sometime, we need to debug production server code.

Here is approach of doing this:
1) start remote server with Debug flag, ex port 8000
2) in window local host cygwin: ssh -L 8787:localhost:8000 remoteuser@remote.myserver.com
3) start eclipse with port 8787.


ps.
-Xdebug
-Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787
or:
SET args=%args% -Xdebug -Xnoagent -J-Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n

No comments:

Post a Comment