是否有可能调试外部Ant任务? [英] Is it possible to debug an external ant task?
本文介绍了是否有可能调试外部Ant任务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个调用外部Ant任务的Ant脚本:
I have an ant script which calls an external ant task:
<taskdef name="runStoriesAsEmbeddables" classname="org.jbehave.ant.RunStoriesAsEmbeddables"
classpathref="project.classpath" />
<runStoriesAsEmbeddables includes="**/Ant*Stories.java" ignoreFailureInStories="true"
ignoreFailureInView="false"
systemProperties="story.path=.,qr.host=*,qr.port=*" generateViewAfterStories="true" />
和我想用-Xdebug启动JVM上的Unix机器。
在Java的任务Xdebug的,但对外部的任务......我不知道如何使用它 - 我读了几文档使用其jvmarg值=。
谢谢!
And I want to use -Xdebug to launch JVM on an unix box. I read several doc which using "jvmarg value="-Xdebug"" in "java" task but for external task...I don't know how to use it. Thanks!
推荐答案
设置ANT_OPTS环境变量。假设你使用的Bash shell:
Set the ANT_OPTS environment variable before running Ant. Assuming you use the Bash shell:
对于Java 1.4:
For Java 1.4:
export ANT_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=y
对于Java 1.5和更高版本:
For Java 1.5 and later:
export ANT_OPTS=-agentlib:jdwp=transport=dt_socket,address=5005,server=y,suspend=y
运行Ant脚本,然后连接到端口5005与调试器。
Run your Ant script and then attach to port 5005 with your debugger.
这篇关于是否有可能调试外部Ant任务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文