How to debug in Eclipse with webshpsere

Go to http://localhost:8091/ibm/console/, login in.

Servers->Server Types->WebShpere application servers->server1
Additional Properties->Debugging service
Check "Enable service at server startup"
Check "JVM debug port", usually it's 7777, this is the port number that you will use.
Click Apply, then click Save directly to the master configuration.
A restart on WebShpere is needed.

In Eclipse, Run->Debug Configurations->Remote Java Application
Create a new Debug Configuration, make sure host as localhost, and port as 7777, also attach source.

How to debug Java code originated by ANT script in Eclipse

Need add the followings to the ant target that you are intended to debug.

   
      
      
       ...
    

When you run this target, it will say "[java] Listening for transport dt_socket at address: 5432", and stop here for you to debug.
You need go to Run->Debug Configurations->Remote Java Application
Create a new Debug Configuration

Host: localhost
Port: 5432

Also attach source.

If you run it, it will go to the debugging point.