当使用Tycho构建项目时,测试用例使用春分启动器运行在新进程中,运行-application org.eclipse.tycho.surefire.osgibooter.headlesstest
。如何调试Tycho运行的测试用例?
如何调试测试用例?
当使用Tycho构建项目时,测试用例使用春分启动器运行在新进程中,运行-application org.eclipse.tycho.surefire.osgibooter.headlesstest
。如何调试Tycho运行的测试用例?
如何调试测试用例?
还有就是要做到这一点更简单的方法:
只需添加-DdebugPort=8000
到Maven命令行并附加远程调试会话。
查看文档http://www.eclipse.org/tycho/sitedocs/tycho-surefire/tycho-surefire-plugin/test-mojo.html#debugPort
添加到您的POM:
<profiles>
<profile>
<id>debug</id>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<argLine>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
现在,您可以启用调试与mvn ... -P debug
当以下行打印:
在地址监听运输dt_socket:8000