Issue
Here's my Spring Boot config
@SpringBootApplication
public class ServicesApplication {
public static void main(String[] args) {
SpringApplication.run(ServicesApplication.class, args);
}
}
Running it using
java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n -jar services-0.0.1-SNAPSHOT.jar
Connecting to the Debug port 8000 from Eclipse Standard (Socket Attach) localhost and port 8000.
Here's what I see in Eclipse
But my breakpoints are not hit. I carefully put breakpoints in the Controller, tried putting them in various places in the Service layer, DAO etc. But the Breakpoints aren't getting hit.
I even tried the Right click -> Debug option in Intellij (Right click on the Spring boot run under Maven Projects view.) The app starts in debug mode and the IDE attaches to it but the breakpoints aren't being hit.
What could be causing this?
Solution
Not sure why my steps laid out in the question do not work but I instead chose to debug this is a vanilla Java app with a main method (Since Spring boot apps have a main method to bootstrap). Could've been a bug in the IDE or the specific version of Spring boot.
Answered By - user6123723
Answer Checked By - Pedro (JavaFixing Volunteer)