I recently started using IntelliJ IDEA in addition to Eclipse after seeing it being used by some dutch colleagues of mine. And I must say that I do like it more and more every day — it just has all these many little things that fill so well to Java.

One thing I do miss though is the ability to debug ANT tasks. In Eclipse, you can make an external launcher, select one or more targets, and run them in debug mode. With IDEA, that just doesn’t seem to work. I did install the ANT debugger plugin which makes it possible to debug through the build file, but that’s not still what I wanted.

So here is a workaround I found, until the folks at JetBrains or HandyEdit will figure it out: make a launch configuration that directly invokes ANT:

  • Main class:

  • Program parameters:

    -buildfile your-build-file.xml your.target

Et voilà, now you should be able to debug your ANT task execution.