My Idea setup cannot stop on breakpoints and not even stop the launched/debugged process.
Environment:
Steps to reproduce:
idea.shpom.xml file to import the project in the IDE@RestController returning "Hello world" for @GetMapping("/")spring-boot:run command linedebug buttonThe application launches and you can call http://localhost to see the "Hello world"; you can even change the code and the app nicely reloads but ... it does not stop on breakpoints.
When you hit the stop button the IDE detaches from the process but does not stop it.
What's wrong with my setup?
BTW: debugging works smoothly for a simple cli maven java application.
Thanks to the suggestion from https://stackoverflow.com/a/47064387/509565 I've worked out the solution:
spring-boot:run -Dspring-boot.run.fork=false as your laucher command lineIt seems that this trick isn't working anymore (Intellij-Idea 2024.4.4, Java 17): you can always start the application from the @SpringBootApplication itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With