Bug 24130 - Ability to debug ANT tasks in the Java Debugger
Summary: Ability to debug ANT tasks in the Java Debugger
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.0   Edit
Hardware: PC other
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: core, ui
: 42925 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-09-26 09:21 EDT by Darin Swanson CLA
Modified: 2021-09-11 02:06 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Swanson CLA 2002-09-26 09:21:06 EDT
Ability to execute ANT tasks in the Java Debugger so I can debug the
ANT task java code itself.
Comment 1 Darin Wright CLA 2002-11-15 14:00:46 EST
Not planned for 2.1
Comment 2 Gilles Scokart CLA 2003-07-29 09:07:40 EDT
Is it planned for 3.0 ?
Comment 3 Darin Wright CLA 2003-07-29 09:30:12 EDT
This is not currently planned for 3.0
Comment 4 Darin Swanson CLA 2003-07-29 10:09:20 EDT
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?
Comment 5 Gilles Scokart CLA 2003-07-29 10:24:09 EDT
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.

Comment 6 Darin Swanson CLA 2003-07-29 13:46:27 EDT
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.
Comment 7 Gilles Scokart CLA 2003-07-30 03:46:30 EDT
Thanks, it works.

Maybe this bug should be changed to "Update the doc to explain how to debug an 
ANT task"... :-)
Comment 8 Darin Swanson CLA 2004-08-12 14:05:59 EDT
*** Bug 42925 has been marked as a duplicate of this bug. ***
Comment 10 Omry Yadan CLA 2006-08-03 03:29:19 EDT
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?
Comment 11 Omry Yadan CLA 2006-08-03 03:37:19 EDT
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.
Comment 12 Gilles Scokart CLA 2006-12-28 11:09:02 EST
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.
Comment 13 Denis Roy CLA 2009-08-30 02:19:42 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.
Comment 14 Ed Willink CLA 2021-09-11 02:06:51 EDT
'Reopened' as Bug 575920