Tuesday, August 26, 2008

Debugging WebSphere with Eclipse

This is how I attach my Eclipse 3.3 to WebSphere 6.1 for debugging my deployed applications.

In WebSphere’s console, I go to Application Servers > my-server-to-debug > Java and Process Management > Process Definition > Java Virtual Machine. Near the bottom of the page, I check Debug Mode and the values I am using in Debug arguments are:
-Djava.compiler=NONE -Xdebug -Xnoagent

After applying the changes, I restart WebSphere.

In the Debug Dialog, I create a new configuration under the category Remote Java Application. I specify the project containing the source code of my deployed application, localhost (my WebSphere is running locally) and the port 7777.

Now I am ready to debug. I add some breakpoints, launch the debug configuration and run my deploy application.

Hope this helps you.

Until next…

No comments: