如何在mvn release:perform时远程调试测试

时间:2016-10-17 09:43:18

标签: java maven maven-release-plugin

我需要在运行surefire时远程调试#include <stdio.h> #include <stdlib.h> void todo1 (); int main() { int i; printf("Enter Number:\t",i); scanf("%d",&i); if (i%2!=0) { printf("%d is an odd number",i); } else { todo1(); } return 0; } void todo1() { if (i>40 || i<=50) { i=i*4; printf("%d", i); } else if (i>30 || i<=40) { i=i*3; printf("%d", i); } else if (i>10 || i<=20) { i=i*2; printf("%d", i); } } 。 我试过了:

mvn release:perform

mvn -Dmaven.surefire.debug="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" release:perform

但测试不会等待远程调试,只是启动。 远程调试mvn -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 -Xnoagent -Djava.compiler=NONE" release:perform 的正确方法是什么?

0 个答案:

没有答案