ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt_Con...@i2.com
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 
-Xrunjdwp:transport=dt_shmem,address=ant,server=y,suspend=y
%_JAVACMD% %DEBUGARGS% -classpath 
%ANT_HOME%\lib\i2tasks.jar;%LOCALCLASSPATH% -Dant.home="%ANT_HOME%" 
%ANT_OPTS% org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%

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 
"Continue"
This way, ant is run with exactly the same environment as if I had run it 
without the debug flags.

Matt


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 
needs
> to be started in a batch file to take notice of environment variables, 
and
> you cannot run jdb in a batch file. I don't know how this works under 
unix.
> 
> Perhaps more of the common processing (such as adding jars found in
> ANT_HOME/lib could be moved into ant.Main ?
> 

Mime
View raw message