How to debug Spring Boot application with Eclipse?

There's section 19.2 in Spring Boot Reference that tells you about starting your application with remote debugging support enabled.

$ java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n \
   -jar target/myproject-0.0.1-SNAPSHOT.jar

After you start your application just add that Remote Java Application configuration in Run/Debug configurations, select the port/address you defined when starting your app, and then you are free to debug.


Easier solution:

Instead of typing mvn spring-boot:run, simply type mvnDebug spring-boot:run

You will still need to attach the debugger in Eclipse by making a new Debug Configuration for a "Remote Java Application" on the relevant port.


Why don't you just right click on the main() method and choose "Debug As... Java Application"?