How to debug spring-boot application with IntelliJ IDEA community Edition?

后端 未结 9 2148
野性不改
野性不改 2021-01-29 23:43

I\'m having difficulties in debugging a Java spring-boot application on IntelliJ IDEA community Edition. The main problem is, that the IDE won\'t stop on a breakpoint, even the

9条回答
  •  -上瘾入骨i
    2021-01-30 00:06

    1. enable the debug port on your app's pom.XML like:

      org.springframework.boot -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005

    1. follow the Ville Miekk-oja sugestion

      So go to edit configurations-> Remote -> +. Then start your application normally through intelliJ. Then switch to the newly created remote configuration. Instead of running it, press debug. Now debugger should be ready, and you can set breakpoints and the debugger will stop to them.

提交回复
热议问题