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.