I'm always excited to take on new projects and collaborate with innovative minds.
contact@niteshsynergy.com
https://www.niteshsynergy.com/
How to debug Spring Boot application with IntelliJ IDEA Community Edition
You’re running a Spring Boot app via: mvn spring-boot:run
and your breakpoints are not getting hit in IntelliJ Community Edition.
This happens because spring-boot:run by default forks a separate JVM, and IntelliJ attaches the debugger to the Maven process, not the forked process where your app actually runs.
main() class directlyYou don’t need the Ultimate Edition for this.
Open the class that contains your Spring Boot main() method, for example: @SpringBootApplication
public class MyApp {
public static void main(String[] args) {
SpringApplication.run(MyApp.class, args);
}
}
Set breakpoints wherever you need (e.g., in a controller or service method).
Right-click that class → choose Debug 'MyApp.main()'.
Wait for the Spring Boot app to start in Debug mode.
Call your API from Postman or browser — IntelliJ will stop at the breakpoint.
This is the simplest and most reliable approach in IntelliJ IDEA Community Edition.
mvn spring-boot:runModify your command so that it does not fork the process.
Run:
mvn spring-boot:run -Dspring-boot.run.fork=false
Now the debugger attaches to the same JVM where your Spring Boot app runs, so breakpoints work correctly.
If you still want to run via Maven or java -jar, you can start the app with remote debugging enabled:
mvn spring-boot:run -Dspring-boot.run.jvmArguments="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
Then in IntelliJ:
Go to Run → Edit Configurations → + → Remote JVM Debug.
Set Host = localhost, Port = 5005.
Start it in Debug mode and trigger your API.
If you prefer to start via Maven goal, you can do it inside the IntelliJ UI too:
Go to Run → Edit Configurations → + → Maven
Name it: Spring Boot (No Fork)
Working directory: path to your pom.xml
Command line:
spring-boot:run -Dspring-boot.run.fork=false
Apply → click → Debug.
Same process — set breakpoints in controller/service → call API → debugger hits.