Reputation: 65
everybody!
For the first, sorry for my english.
I work currently on some java project and I have met very strange problem. When I debug my project I notice that some part of breakpoints are marked neither valid nor invalid. IDEA ignores these breakpoints, but if an exception are thrown on the lines of these breakpoints, IDEA are able to stop execution there.
What should I do to make IDEA to stop on regular breakpoints?
Thank for your answers.
Upvotes: 1
Views: 1142
Reputation: 708
I encountered the same problem and it was due to the different process context my code to debug has been started in.
This is an common issue for integration testing.
When debugging locally this all works fine. But on a remote connection you have to specify an additional debug port for the other started JVM(s).
Alternatively for sure-fire tests (e.g. cucumber tests) specifying
-DforkCount=0 is sufficient to catch the break points.
see also here:
http://maven.apache.org/components/surefire/maven-failsafe-plugin/examples/debugging.html
Upvotes: 1
Reputation: 5550
I had this same problem, and invalidate cache didn't solve it. Breakpoints were there, but not marked as valid.
The problem for me turned out to be Charles Proxy, which I was running in the background. I restarted that and all my breakpoints started working again.
Upvotes: 0
Reputation: 4534
You should specify what version of IDEA you are using and what code you are debugging.
I have such problem while using remote debug on web-server, when deployed application's code was different from my local. In that case you should redeploy new code or load in ide old one.
Also, you can try to remake project or recompile code, which you are debugging.
Upvotes: 0
Reputation: 39457
IDEA is using a cache, it's probably invalidated.
I sometimes delete the cache manually and then wait IDEA
to recreate it when I next open my project.
This takes some time as my project is quite large.
Now I use STS as an IDE instead which has its
deficiencies too. There's no perfect IDE.
Try deleting your cache manually.
Here are a few links to get you started.
http://www.jetbrains.com/idea/webhelp/cleaning-system-cache.html
http://devnet.jetbrains.com/docs/DOC-181
Upvotes: 1