I am developing a custom ant task with java in the eclipse ide.
is it somehow possible to debug it? that is put a breakpoint on the java line and when ant is executed, i
You need to start ANT with the remote debug enabled by entering the following before you run ANT.
set ANT_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
This will cause the JVM running ANT to pause until you attach your debugger.
Next you'll need to modify the classpath ANT is using in order to pickup the classes that form the custom task you're writing. I don't think there's a way to do this easily with environment vars, so the quickest thing is to just edit the ant.bat
file.
Now when your custom task is run, it will stop at any breakpoints in your IDE.