Intellij Debugging picking up old version project files

You can tell Intellij 2016 to ask you each time which source code to step through. File->Settings->Debugger

Show alternative source switcher

Show alternative source switcher


  1. Try removing .jar and .war files that contain your code from your ~/.m2/repository/ For me the issue is that I built something and it is now registered in Maven under what Maven considers a newer version, but isn't what I was currently working on. I compiled, say, version "2.1" to debug something and then went back to working on "sand-box-idea-SNAPSHOT". I keep thinking why isn't Intellij picking up my latest sand box change but it's because it's deferring to the Maven version 2.1 which Maven assumes is better than 'sand-box-SNAPSHOT'.

  2. It may be that you have some plug-ins interfering with IntelliJ's build process. I know that the Google Protocol Buffers Plugin can cause my Intellij to be unable to detect dirty classes that need to be re-compiled.


I've met similar behavior, maybe it can help you :-)

I developed app (using maven) and during the time I change output packaging from jar to war. Maven repository than contained both versions, jar and war, because maven does not remove old jar when you change it. As project pointed to mvn repository, it still used old reference to jar but new version within war was updated.

I was really upset as maven compilation and tests worked fine but Idea used me old version. I've had rebuild idea project and it worked later fine.