-3

I'm working on a Spring Boot application using IntelliJ IDEA. I can run the application locally with a Maven run configuration using the goal spring-boot:run, and it works as expected.

enter image description here

However, this configuration doesn't support debugging (breakpoints are ignored). To work around that, I created a Remote JVM Debug configuration, which does allow me to debug the application.

enter image description here

Some colleagues are using the IntelliJ Spring Boot run configuration provided by the paid version of IntelliJ (or available only through a paid plugin), which lets them start the application normally and in debug mode without extra setup.

Is there any free and simpler configuration that would allow running and debugging the application from IntelliJ without relying on remote debugging? I also tried using the Application configuration, but it fails with bean-related errors.

I am not launching the debug from the application class directly because I need to configurate the environment variables.

I have also tried to use the goal: spring-boot:run -Dspring-boot.run.fork=false but still not stopping in the break points when debugging.

8
  • Right click the application class, press debug. Why complicate it more with a maven task? Commented 2 days ago
  • 1
    check this question here, you may find what you need, it seems that it's a duplicate question. Commented 2 days ago
  • @M.Deinum Because therre are configurations to do with environment variables. that's why I don't launch the debug directly from the Application class. Commented yesterday
  • Launch it with the main, modify that run configuration to include the environment variables. No reason to use maven for that. Commented yesterday
  • @M.Deinum I have tried what you propose but I have still errors: Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2025-11-21 10:19:16.678 ERROR 88232 --- [ main] o.s.b.SpringApplication : Application run failed ...UnsatisfiedDependencyException: Error creating bean with name 's3ServiceImpl': Unsatisfied dependency expressed through field 's3Client''... These errors don't appear when launched with the maven configuration or the Spring plugin configuration. Commented yesterday

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.