Breakpoints not hit anymore on Windows


I have a weird problem that recently started (still need to figure out exactly when) in a project using Kotlin 1.2.20 / 1.2.21, Gradle 4.4.1 / 4.5, and kotlintest 2.0.7. For some reason, IntelliJ does not hit breakpoints anymore, but only on Windows: All breakpoints say “Breakpoint does not belong to any class”. The exact same project still works on Linux. I already tried several times to re-import the Gradle project from scratch, but still no go.

Has anyone else seen something like this?


Most certainly the problem is in corrupted gradle cache. Delete gradle directory in the project, invalidate/restart IDE and reload gradle configuration. Usually it helps.


Thanks for the hint, but I’ve already done git clean -fdx (which deleted .gradle in the project dir) and re-imported the project from scratch without any luck. Also, I don’t have the global Gradle build cache enabled for this project.


The only other reason I can think of is different version of kotlin plugin and compiler. IDEA usually shows warning in that case.


No, the versions are in sync and no warning is displayed. Meanwhile I has the chance to verify that debugging the project works on another Windows machine. So something must be corrupted in my setup, but I’m clueless what to delete in order to fix that.


Are you running it with gradle or IDEA runner? Idea has a separate code cache. Invalidate/restart usually helps, but not always. Also I had some bizarre things happening with Java 9 JDK, I had to roll back to JDK 8.


I’m using the “Gradle Test Runner” with JDK 8…


Try it with default IDEA test runner instead. Gradle test runner does not always work well with idea debugger.


There’s only a choice of “Platform Test Runner”, but that doesn’t work either.