Ant Debugger
for IntelliJ IDEA

Compatible with:  IntelliJ IDEA Android Studio
11 391
Ant Debugger enables Apache Ant build script debugging:
  • Open build file in editor
  • Set debug breakpoints (screenshot 1)
  • Right click on editor to show context menu (screenshot 2) and select the "Debug" menu item to launch Ant debugger
  • Wait until the Ant debugger stops on breakpoint then use step or resume debugger commands, investigate Ant variables and execution stack (screenshot 3)

You can add Ant debug configuration from the Edit configurations dialog (screenshot 4). Then you select Ant file, Java SDK for debugging session (screenshot 5).

Note. Plugin requires Java SDK to launch Ant: plugin uses build file module, project or any SDK for JDK list (the plugin searches for Java SDK in this order and uses first found).

Installation: use Idea plugins manager:

  • open Settings > plugins
  • wait until the plugin list loads
  • right click on Ant Debugger plugin and select install / update from the context menu
  • restart Idea

Supported Idea versions: Idea 8.1.x, Idea 9 (community and ultimate editions).

Please write to antdebugger at if there are errors / problems when using Ant debugger

Download plugin

Recent change notes


  • Run setting: logging level (default, quiet, verbose, debug).
  • Launch targets from context menu fix


  • Show pathes in Ant variables (also avaliable in the Evaluate dialog by Alt-F8). The variable name is path element ID.
  • Don't stop on property tasks when stepping only if the task is outside the current target


  • Breakpoints fix for tasks with multiline empty tag
  • Don't stop on patternset, path, tstamp tasks when stepping


  • Create configuration from context menu: 'make' is disabled
  • Don't stop on property, typedef, taskdef tasks when stepping
  • Breakpoints fix for tasks with multiline open tag


  • Step in / over / out support
  • Run to cursor fixes


  • Run configuration fix: create configuration


  • Variable value tooltip, expression evaluation (Alt-F8)
  • Run configuration: show targets from imported files
  • Run configuration fix: reload targets list on build file change


  • Set breakpoint fix for Windows
  • Run configuration fix: create configuration in project without JDK
  • Fix: determine that Ant process terminated on debugger connect


  • Run configuration: build target selection
  • Can debug target right clicking on it
  • Run configuration: VM parameters


  • Fix: projects with JDK 1.5
  • Fix: step into macro-def
  • Multiple files support fixes


  • Ant launch fix for Windows: quotes


  • Ant launch fix for Windows


  • Fix for Windows: removed Java path checking
  • Ant launch fix for Windows


  • Configuration: custom Ant tasks folder
  • Fix: don't block Ant build if Idea hasn't connected to it (timeout in build listener)
  • More feedback for connect error


  • Multiple XML files support
  • UI enhancements

Two problems: 1. Adding a long "VM Parameters" string causes the text fields to disappear off to the right-hand side of the configuration pane. 2. There is no way to add multiple system properties. Using the "VM Parameters", it is possible to add one via a -D flag, but the runner places all of these parameters inside double quotes, so multiple flags do not work.
Not sure how well this still works in IntelliJ IDEA 10.x. At least for me it's no longer stopping at any breakpoints in the ant script.
Doesn't work for me. Ignores the Additional Classpath in the properties.
This is still very young, but with a little work will be a fantastic plugin! An Ant debugger has been missing from IDEA for far too long. It's one of the few areas I've had to use NetBeans or Eclipse for.

The plugin works great on OS X, I've had some issues with XP, but the author has been very responsive in fixing bugs so far.

Kudos to Alexi for writing this!
Expression evaluation doesn't work yet (Alt-F8)
It will be in next release
Ant debugger 1.0.2:
Please download the 1.0.2 version when appears download link for it (needs approve of this site admin...)
There are more feedback about connection error in the new version: dialog boxes, and console with Ant command line is shown even if hasn't connected.

1. Does debug tool window appear and what's Ant command line in it (in console tab)? Maybe Ant build hasn't started due errors in it.

2. Does your build uses custom Ant tasks? You need to select the folder with JARs that contain your custom tasks (Ant debug configuration).

3. Maybe, the port for debugging is used. Use netstat to see if there is a process that uses Ant debug port (see port number in Ant debug configuration).

Please write email with your details to antdebugger at, and we'll try to find what's wrong.
When trying to debug I get "Can't connect to Ant process". Thoughts as to how to resolve this?

XML only now
When debugging, is it just xml or will it allow you to GoTo the ant task java code?
Please  sign in  to leave a comment.