Impossible to debug "Warning: no executable code found at line"

I am using the maven jetty plugin to run and debug an IntelliJ module.
If I modify one class, which is located in another module in the same project, I cannot set breakpoints anymore.
In fact, I can create a new breakpoint but it appears with a cross and when I hoover the mouse over it I see the warning message:
"Impossible to debug "Warning: no executable code found at line ..."

I already tried with each of the solutions proposed here:
http://stackoverflow.com/questions/11591662/cannot-set-java-breakpoint-in-intellij-idea

I even did a full "mvn clean install" and it did not help.

I also verified in the Java Compiler options that the "Generate debugging info" checkbox is selected, ad just in case increased the "Build process heap size" to 1024 Mbytes.

Last time I had this problem solved by coincidence when I restarted the machine, nothing else worked, but obviously this does not worl for the long run.
Any clue?

Thanks

2 comments
Comment actions Permalink

For some reason sources in IDE and classes on the server are not in sync. There could be many reasons for that, so it's hard to suggest anything specific.

If you have a reproducible test case project, please share it.

1
Comment actions Permalink

Try this. after changing classes, delete the content for target (mvn clean)

proceed with compilation, mvn clean compile package install

start again the server and try to debug again,

1

Please sign in to leave a comment.