Community
Participate
Working Groups
Ability to execute ANT tasks in the Java Debugger so I can debug the ANT task java code itself.
Not planned for 2.1
Is it planned for 3.0 ?
This is not currently planned for 3.0
You can do this with a little bit of work. You can use the Runtime-workbench launch configuration to self-host an Eclipse target or you can launch an Eclipse session in debug mode such that another Eclipse session can remote debug any Ant task that you run. Gilles, what exactly are you attempting to do?
I have writen my own ANT task, and I want to debug his code when called from an ANT script. I'm sure to understand your suggestion. I have tried to launch a separate workbench from the Debug... menu, but when I specify my "normal" workspace data, the workbench doen't start. Do I have to use a separate worspace data and rewrite the content of the project that contains the ant script? I have also seen options in the Common tab of the "Ant launcher". But I don't know what to put in the "Type of launch configuration", and the "Debug Mode" drop down is disabled. Could you explain me or give a link to some documentation.
I am the documentation currently :-) You cannot have two Eclipse sessions working on the same workspace at the same time. You can import an existing project from one workspace to another using File >Import> Existing Project into Workspace. I would try this: launch a run-time workbench launch configuration on a new workspace target point it to a new workspace. import your project(s) as outlined above. Run your Ant builds and debug your Ant tasks using the host Eclipse session.
Thanks, it works. Maybe this bug should be changed to "Update the doc to explain how to debug an ANT task"... :-)
*** Bug 42925 has been marked as a duplicate of this bug. ***
http://eclipsewiki.editme.com/ANTFaq#debugCustomTask
DarinS, I think this is not an ideal solution: woudln't it be better to run ant itelf as a java application in the debugger, and give it the build file as an argument?
well, it works fine. here is how: you need to add ant-launcher.jar to the project classpath, and run or debug it. for my case, I needed to change its working directory to 'test', because there is where my test build.xml was sitting. you can just as easily provide a build file as a command line argument in the standard way.
Still no plan to fix it. The workarounds are nice, but still heavy. It would be very nice to be able to step-in the java task code when running a debug of the ant script.
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.
'Reopened' as Bug 575920