Debugger stops in source code where no breakpoint is defined
Answered
Hi all,
I have defined some breakpoints in external libraries (jars) and Intellij stops on them. Unfortunatelly, it stops in another part of the source code where I have no breakpoints, why? What can I do to avoid this behaivour? I have to click allways F9 to jump such "ghost-breakpoints"
Regards
S.
Please sign in to leave a comment.
Make sure classes and sources are in sync. Attach a screenshot with configured breakpoints and .idea/workspace.xml file. Specify the file/line where is stops, but shouldn't.
Here is the statement where Intellij stops without setting a breakpoint: (Link) I use the jar which contains that file.
It happens in the following line, although I haven't defined a breakpoint in that line
"db = factory.open(dbPath.toFile(), options);"
workspace.xml
Here is where I put the breakpoint and where stops as desired:
Any idea what to do?
Here is a screenshot where it stops
Hi, what IDEA version are you using?
Please also check that you do not have other breakpoints (exception, method, etc.). To verify it is better to remove/disable them all.
Hi Egor,
I removed all the breakpoints and now works fine. Thanks a lot.
Regards
S.
I ran into the same thing. The fix for me was:
So if your rogue breakpoint is in a file called rogue_breakpoint.py, you're looking for:
I had the same exact problem and I think I understand the bug.
I wrote some code, put a breakpoint there, and them commented it without removing the breakpoint.
Then, when the code runs it stops on a ghost breakpoint on a random fixed line of code.
Conclusion: The problem is having breakpoint at commented code. Just delete those breakpoints on commented code, and it will work as expected
Another thing to consider is that you might see ghost breakpoints if the compiled code doesn't match up with the source code.
Got the same error. My project uses a library that I also have access to. I made changes to it, did a ./gradlew assemble install , and after I opened the modified library class in the main project, the breakpoints became invisible.
Cache invalidation helped, breakpoints became visible and I was able to turn them off.
Thank you so much Ben Plowman ! This really worked. It would be nice if there is a simpler way like clicking an option in the Pycharm GUI to remove all these ghost/phantom breakpoints.