Broken Spring Boot Debugging Process - Ignoring Breakpoints

I ran into the same problem twice. As soon as I try to update the spring boot maven plugin version to version 1.0.1, the application will not stop at any of the debug breakpoints.

During development, we identified the problem, and we had to fall back to 1.0.1, being on spring parent 1.1.9. What are the risks of such a decision, which 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 freezes endlessly.

There is a workaround if you work in the default profile by simply debugging the application class, but I cannot configure anything else in this case.

A screenshot showing how the debugger could not stop at the very first breakpoint, and instead the application was launched.

Screen

+5
source share
3 answers

The purpose of spring-boot is to start the forks java process, and your application starts in another, and then your debugger is connected. You should use this page http://docs.spring.io/spring-boot/docs/current/maven-plugin/examples/run-debug.html to configure the correct debugging options for the forked process, and then use the IntelliJ Remote debugging. "

+6
source

Set VM options in Run/Debug Configuration as:

  -Xdebug -Xrunjdwp: transport = dt_socket, server = y, suspend = y, address = 5005 

Image: https://i.stack.imgur.com/BIKdl.png

0
source
 annotate those is ok: <!-- <configuration> <jvmArguments>-Djava.rmi.server.hostname=localhost -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005</jvmArguments> </configuration> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>springloaded</artifactId> <version>1.2.3.RELEASE</version> </dependency> </dependencies>--> 
0
source

Source: https://habr.com/ru/post/1207961/


All Articles