DEV Community

Cover image for Debugging SpringBoot Application In IntelliJ Idea CE
Davey
Davey

Posted on • Edited on • Originally published at developinjava.com

3 1

Debugging SpringBoot Application In IntelliJ Idea CE

When debugging a SpringBoot application in IntelliJ Idea Community Edition, additional steps need to be taken.

If you have defined your run configuration as spring-boot:run, you will find that the application runs, but does not stop at breakpoints as expected.

An easy way to resolve this is to set the spring-boot.run.fork property to false.

This can be set wither within the pom.xml file, or within the run configuration. To set the run configuration, set the "Command line:" within the Run Configuration to be:

spring-boot:run -Dspring-boot.run.fork=false
Enter fullscreen mode Exit fullscreen mode

The default value of this property is true, which is usually the best setting, but not when debugging from IntelliJ Idea CE. If the application is forked, then the relevant JVM properties are not passed on to the forked process and debugging does not work as expected.

Changing the value of this property all the time can cause problems with Spring Boot DevTools, so its only recommended to set at runtime and not in the pom.xml file where it will be used every time the application is started.

Credits

Photo by Zan on Unsplash

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay