websphere遠端debug就是當websphere跑工程時候,我們能在eclipse本地,調适布置在同時運作在websphere下的工程。 它跑的是domain下的工程,但是我們調試隻是在本地調試對應的src裡的JAVA檔案,是以本地SRC的JAVA檔案不用COMPILE也能DEBUG.
1.關于WEBSPHERE端。
相關連接配接:如何設定websphere.
[url]http://www.jetbrains.com/idea/docs/WebSpherehowto.pdf[/url]
servers->application servers->servername->configuration->additional properties->Debugging server.
這裡設定好JVM DEBUG PORT和ARGUMENTS.
比如我這裡分别為4000,和-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000。
最好也在這個确認下。
servers->application servers->servername->process definition->JVM Virtual machine
這裡
check off (Debug Mode).
DEBUG ARGUMENTS也應該是
-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000
WEBSPHERE改完後,要SAVE和重起這個應用。
2.關于本地eclipse端。
然後在eclipse中打開debug configuration,然後選擇Remote Java Application,
然後new 一個,在新的視窗,設定好需要debug的工程,把websphere中為遠端debug開設的jvm端口和IP設定也設定到這個視窗裡。
(如果websphere在本地,那麼就應該PORT:4000,HOST:localhost)
然後在WEBSPHERE啟動SERVER後,我們這裡連接配接就行。
然後就可以在eclipse裡debug了。