在Eclipse中调试Cactus测试(Debugging Cactus Tests in Eclipse)
旁注:这是继承的代码,我没有做任何设置,也不是项目的新手。
我正在尝试在Eclipse中为使用Cactus的这些单元测试设置远程调试。 我已经阅读了一下(但我似乎无法找到任何真实的信息如何设置它)。 我发现最近的是(http://www.eclipse.org/webtools/community/tutorials/CactusInWTP/CactusInWTP.html),但它只是说调试 - >调试服务器,但它没有说它在哪里调试端口设置或任何东西,我找不到任何关于如何启用它,设置它。
只是想询问是否有人之前已经设置过它,它真的有助于单步执行代码而不仅仅是记录。 该插件(http://jakarta.apache.org/cactus/integration/eclipse/runner_plugin.html)看起来很有前景,但我也不知道在哪里下载它,它没有链接到一个位置-.-
该项目使用ant,cactus,我正在使用Eclipse。 谢谢
编辑这是我正在使用的目标
<junit fork="no" forkmode="perTest" printsummary="yes" haltonfailure="no" haltonerror="no" failureproperty="tests.failed"> <jvmarg value="-Xdebug" /> <jvmarg value="-Xrunjdwp:transport=dt_socket,address=localhost:8005,server=y,suspend=y" /> <formatter type="xml" usefile="true" /> <formatter type="plain" usefile="false" /> <classpath> <pathelement location="${clover.jar}"/> <path refid="cactus.classpath.id" /> <pathelement location="../ejb/src" /> </classpath> <sysproperty key="cactus.contextURL" value="${cactus.contextURL}"/> <test name="com.test.AllTests" outfile="TESTS" /> </junit>
Side note: This is inherited code, I didn't do any of the setup and am new to the project.
I'm trying to set up remote debugging in Eclipse for these unit tests that use Cactus. I've read around a bit (but I can't seem to find any REAL information how to set this up). Closest I've found is here (http://www.eclipse.org/webtools/community/tutorials/CactusInWTP/CactusInWTP.html), but it just says to Debug -> Debug on Server, but nowhere does it say where the debug port is set or anything, and I can't find anything on how to enable this, set it.
Just asking to see if anyone has set this up before, it would really help stepping through the code rather than just logging. The plugin (http://jakarta.apache.org/cactus/integration/eclipse/runner_plugin.html) Looks promising, but I also don't even know where to download it, it doesn't link to a location -.-
The project uses ant, cactus, and I'm using Eclipse. Thanks
EDIT Here is the target I'm using
<junit fork="no" forkmode="perTest" printsummary="yes" haltonfailure="no" haltonerror="no" failureproperty="tests.failed"> <jvmarg value="-Xdebug" /> <jvmarg value="-Xrunjdwp:transport=dt_socket,address=localhost:8005,server=y,suspend=y" /> <formatter type="xml" usefile="true" /> <formatter type="plain" usefile="false" /> <classpath> <pathelement location="${clover.jar}"/> <path refid="cactus.classpath.id" /> <pathelement location="../ejb/src" /> </classpath> <sysproperty key="cactus.contextURL" value="${cactus.contextURL}"/> <test name="com.test.AllTests" outfile="TESTS" /> </junit>
原文:https://stackoverflow.com/questions/4504587