IntelliJ IDEA debugger skips breakpoints when debugging Maven tests

后端 未结 4 736
予麋鹿
予麋鹿 2021-02-01 18:23

I am trying to debug Maven tests in IntelliJ IDEA. When I open IDEA\'s Maven Projects view and right-click on test goal, I get an option to debug it. C

4条回答
  •  难免孤独
    2021-02-01 18:52

    One solution would be to use remote debugging:

    1. configure the surefire plugin: true;

    2. run the test (will wait for a remote debugger to connect)

    3. create and run a remote debug configuration in IntelliJ (will hit your breakpoint); the port to connect to is 5005.

提交回复
热议问题