[转载]Remote Debugging With Eclipse + WebSphere 7

By mkyong

So far, there is still lack of WebSphere 7 plugin for both Eclipse and NetBeans IDE. However, you are able to debug your web application via Java Debugger (jdb).

Here’s a guide to show you how to remote debugging your web application in Eclipse and WebSphere via Java Debugger (jdb).

Eclipse <—-> Java Debugger (jdb)
<—-> WebSphere 7

1. Enable WebSphere in Debug Mode

In WebSphere web console, left navigation,

1. Servers –> Server Types –> WebSphere application servers
2. Under Server Infrastructure section –> expand Java and Process Management –> Process definition
3. Under Additional Properties section –> click Java Virtual Machine
4. Checked the Debug Mode
5. In Debug arguments textbox, put this

Xdebug Xnoagent Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8888

6. Restart WebSphere server instance.


Now, WebSphere is started in debug mode, and listening on port 8888. (Later, Eclipse will connect to this port for debugging)

 

【出处:http://www.mkyong.com/websphere/remote-debugging-with-eclipse-websphere-7/】

 

==============================================================================================

以下是Eclipse中的一些”远程调试”设置,其中主机IP与端口号要与自己在Websphere设置的一致才可以。

 

 

 

启用”远程高度”时,可能会遇到这样的错误提示:Connection refused

连接被拒绝了,可以从以下几点来找原因:

  1. Webserver Server是否重启了,调试用的端口是否正常使用了(netstat -a | grep 8888)
  2. 是不是被防火墙给屏蔽了?
  3. 其它网络无法连接的原因