How to debug Spring Boot application with Eclipse?

后端 未结 13 2513
星月不相逢
星月不相逢 2020-12-04 07:04

My Spring Boot webapp is running just fine, and I\'d like to debug it through Eclipse.

So when launching my Remote Java Application debugger, which port

13条回答
  •  南笙
    南笙 (楼主)
    2020-12-04 07:08

    I didn't need to set up remote debugging in order to get this working, I used Maven.

    1. Ensure you have the Maven plugin installed into Eclipse.
    2. Click Run > Run Configurations > Maven Build > new launch configuration:
      • Base directory: browse to the root of your project
      • Goals: spring-boot::run.
    3. Click Apply then click Run.

    NB. If your IDE has problems finding your project's source code when doing line-by-line debugging, take a look at this SO answer to find out how to manually attach your source code to the debug application.

    Hope this helps someone!

提交回复
热议问题