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, it stops there and i can step through the code?
edit: since this question has been closed as duplicate, i want to elaborate why it is quite different.
i am looking to debug the java code that makes up an ant task and not the just the steps of an ant build. the answers already helped me partially, but i still need to figure out why my eclipse doesnt have Debug Remote Java Application.
You need to start ANT with the remote debug enabled by entering the following before you run ANT.
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.