ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: ant with jdb
Date Fri, 15 Jun 2001 15:36:50 GMT
I usually add something like the following to my batch file when I want to 
debug ant:

set DEBUGARGS=-Xdebug -Xnoagent -Djava.compiler=NONE 
%_JAVACMD% %DEBUGARGS% -classpath 
%ANT_HOME%\lib\i2tasks.jar;%LOCALCLASSPATH% -Dant.home="%ANT_HOME%" 

Then I just attach to it with my debugger.  Since I specified "suspend=y", 
execution doesn't proceed till I attach and tell the debugger to 
This way, ant is run with exactly the same environment as if I had run it 
without the debug flags.


On 06/15/2001 10:55:43 AM Russell Gold wrote:
> Is there a way to run ant - or more specifically a task such as <java>
> under debug?
> Has anyone discussed adding anything to ant to facilitate this?
> One obvious problem is that - at least under windows - ant generally 
> to be started in a batch file to take notice of environment variables, 
> you cannot run jdb in a batch file. I don't know how this works under 
> Perhaps more of the common processing (such as adding jars found in
> ANT_HOME/lib could be moved into ant.Main ?

View raw message