[转]Remote Debugging with Eclipse + WebSphere 7
原文链接:http://www.mkyong.com/websphere/remote-debugging-with-eclipse-websphere-7
?
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).
?
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
Now, WebSphere is started in debug mode, and listening on port 8888. (Later, Eclipse will connect to this port for debugging)
?
2. Install or deploy web application to WebSphere“war” your web application, install (first-time) or deploy it to WebSphere. And start your web application in WebSphere.
?
3. Eclipse’s Java Debugger (jdb)In Eclipse IDE, under your project source
1. Click on “Run”, “Debug Configurations…”
2. Select “Remote Java Application”, right click and select “New”
3. Renamed a new name , e.g “WebSphere 7 Instance”
4. In “Connection Type”, select default, “Standard (Socket Attached)”
5. Host, put your WebSphere host IP
6. Port, put 8888.
7. Click on the debug button.
Now, Eclipse debugger is started and connected to port 8888.
?
4. Debugging, see result!Open your favor browser, and type your web application URL. Now, Eclipse will stop at your predefined breakpoint.
Done.
?
Note