Maven build debug in Eclipse

后端 未结 4 1447
别那么骄傲
别那么骄傲 2020-12-12 19:03

I want to debug Eclipse build with tests. I tried to run it by Run > Debug Configurations > Maven Build. In Base directory is my Maven repo directory with pom.xml file, in g

4条回答
  •  情歌与酒
    2020-12-12 19:53

    Easiest way I find is to:

    1. Right click project

    2. Debug as -> Maven build ...

    3. In the goals field put -Dmaven.surefire.debug test

    4. In the parameters put a new parameter called forkCount with a value of 0 (previously was forkMode=never but it is deprecated and doesn't work anymore)

    Set your breakpoints down and run this configuration and it should hit the breakpoint.

提交回复
热议问题