phantom breakpoints


hello, thanks so much for pycharm. note: i did search the forum, found this but not helpful in my case. 

for some reason, pycharm seems to be creating phantom breakpoints and duplicate breakpoints 
when i debug my code, pycharm will stop at the phantom breakpoints.

this has been going on for a few weeks, i was using 2020.3.1.2, now upgraded to latest 2023.1.4, problem persists.
i have tried removing all breakpoints, but the problem always returns.

the screen snippet illustrates the point, running in debug mode, pycharm stops at line 611:
note: as far as i know, i have never set a breakpoint for line 611, nothing there i would set a breakpoint for.
1. the bookmark panel display "".
2. the code editor, line 611 does NOT have the corresponding, expected red circle, so why does pycharm stop?

stranger yet, using code editor, if i manually add a breakpoint for 611, so now i have duplicate breakpoints listed.


Could you check if removing the .idea folder from the project root helps?
Note, it contains your project settings.


Sergey Karpov, thanks for the reply, got me thinking.

in the .idea folder, i found that workspace.xml contains the breakpoints.
i manually removed them. now, so far, all is working.

the phantom breakpoints were from files were removed from the project weeks ago.



hello, thanks,
now, again, having issues with breakpoints.

i noticed that the line number from the UI and the workspace.xml do not match.
and this applies to multiple breakpoints.

1. in the UI, same as before
--- the breakpoints panel shows breakpoint for line 1004
--- the code panel does NOT show the red circle

2. workspace.xml shows the breakpoint for line 1003

        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
          <option name="timeStamp" value="54" />


PyCharm 2023.1.4 (Community Edition)
Build #PC-231.9225.15, built on July 11, 2023
Runtime version: 17.0.7+10-b829.16 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2024M
Cores: 8

Could you still check if removing the whole .idea folder helps?
I suspect it may be related to something else other than workspace.xml