---
title: "websphere  如何对应eclipse 进行远程debug"
author: "dmwdmc"
date: "2010-06-09T11:29:24Z"
tags: []
categories: ["企业架构"]
slug: "websphere-eclipse-debug"
draft: false
lastmod: "2010-06-09T11:40:21Z"
id: 687831
url: "https://dmwdmc.iteye.com/blog/687831"
---

websphere远程debug就是当websphere跑工程时候，我们能在eclipse本地，调适布置在同时运行在websphere下的工程。 它跑的是domain下的工程，但是我们调试只是在本地调试对应的src里的JAVA文件，因此本地SRC的JAVA文件不用COMPILE也能DEBUG.

1.关于WEBSPHERE端。

相关连接：如何设置websphere.
<http://www.jetbrains.com/idea/docs/WebSpherehowto.pdf>
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了。