0

I'm checked out on a branch, let's call it branch_a. On branch_a, I'm debugging a Spring Boot app with Maven using IntelliJ IDEA on my local machine which is accessible through my company network. This allows a BA to test some changes I made without me having to push the changes to the repo and have them dropped in a dev container. I want to checkout branch_b while still running branch_a for the BA so I can work on some other stuff. However, when I checkout branch_b, Maven instantly recognizes a difference in dependencies (it's an old branch that I'm trying to update), which loads the differences and breaks the currently running instance, killing the Spring Boot app.

I've set the update action and frame deactivation to Do nothing in the run/debug configuration but it looks like Maven or Spring Boot does it somewhere else.

Is there a way to have the configuration running or debugging on my machine using the code from branch_a while allowing a checkout from branch_b while it's running without reloading the packages from the POM? Or maybe make it so maven doesn't do any lifecycle tasks if the project is already running?

Darrel Holt
  • 870
  • 1
  • 15
  • 39

1 Answers1

0

I found the solution here. Doing the opposite of the answer: uncheck "Build project automatically" if you would like the ability to checkout from a different branch while a debug session is already running on another branch.

Darrel Holt
  • 870
  • 1
  • 15
  • 39