Aubergine Aubergine - 11 days ago 5
Java Question

Broken Spring Boot Debugging process - ignoring breakpoints

I've encountered the same issue twice. As soon as I try to upgrade the spring boot maven plugin version to something greater than 1.0.1 release the application does not stop on any of the debug breakpoints.

During the development we identified the problem and we had to fallback to 1.0.1 while being on Spring Boot parent 1.1.9 What are the risks of such decision I can only guess.

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.1.9.RELEASE</version>
<!-- <version>1.0.1.RELEASE</version> works flawlessly-->
</plugin>
</plugins>
</build>


http://docs.spring.io/spring-boot/docs/current/maven-plugin/examples/run-debug.html - this link never helped. The application just hangs waiting infinitely.

There is a workaround if you are running in default profile just by debugging the application class, but hey I can't configure anything else in this case.

Screenshot demonstrating how the debugger failed to stop on the very first breakpoint and application started instead.

Screen

Answer

The goal spring-boot:run forks java process and your application is started in the other one then your debugger is attached. You have to use that page http://docs.spring.io/spring-boot/docs/current/maven-plugin/examples/run-debug.html to setup correct debugging parameters for forked process and then use IntelliJ's feature "Remote Debug".

Comments