Breakpoint is invalid : Source code changed.

Hmm, got an odd problem debugging my project.

The problem is that for some of my source files, Idea disables a breakpoint when it should have stopped there, complaining that:

"Breakpoint is invalid : Source code changed."

I know people have posted about this before, but I can't see anyone with a reasonable* solution.

We are not using Idea to compile the source code but using an Ant build file.

What's odd is that we have two source directories. The breakpoints do work for the source files in one of the directories, but not in the other. Both directories are compiled in exactly the same way - by being copied to a common directory first.

Also this was working up until a few days ago....

Any advice would be most appreciated.


*ie other than recreating the project every week when it happens.

Comment actions Permalink

Forgot to say using Idea 5.0.2, build 3542

Comment actions Permalink

Does anyone know if it possible to get Idea to say which source files it thinks have changed?

We are doing some slightly fruity stuff with out source files - the actual file that I'm trying to debug hasn't changed, but there is a chance that an interface of one of the parent classes may have been changed by the build process....but it's difficult to chase down exactly what Idea think the problem is.

Comment actions Permalink

This appears to be a bug in Idea.

Before the classes that had this problem only had constructors that took parameters.

Adding contructors that take no parameters (but which aren't used) makes the problem go away.

Bug report filed....

Comment actions Permalink

This should have been fixed in IDEA 5.1.
Please try the early access build. Does it work for you?

Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
"Develop with pleasure!"


Please sign in to leave a comment.