Reputation: 1849
I'm using PyCharm and am writing a pytest unit test. I can run the test normally but if I try to debug it the debugger crashes.
Windows fatal exception: access violation
Thread 0x00003588 (most recent call first): File "C:\Users\MyUserName\AppData\Local\Programs\Python\Python310\lib\threading.py", line 324 in wait File "C:\Users\MyUserName\AppData\Local\Programs\Python\Python310\lib\threading.py", line 600 in wait File "C:\Program Files\JetBrains\PyCharm 2021.1\plugins\python\helpers\pydev\pydevd.py", line 150 in _on_run File "C:\Program Files\JetBrains\PyCharm 2021.1\plugins\python\helpers\pydev_pydevd_bundle\pydevd_comm.py", line 218 in run File "C:\Users\MyUserName\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009 in _bootstrap_inner File "C:\Users\MyUserName\AppData\Local\Programs\Python\Python310\lib\threading.py", line 966 in _bootstrap
Thread 0x000023f0 (most recent call first): File "C:\Program Files\JetBrains\PyCharm 2021.1\plugins\python\helpers\pydev_pydevd_bundle\pydevd_comm.py", line 292 in _on_run File "C:\Program Files\JetBrains\PyCharm 2021.1\plugins\python\helpers\pydev_pydevd_bundle\pydevd_comm.py", line 218 in run File "C:\Users\MyUserName\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009 in _bootstrap_inner File "C:\Users\MyUserName\AppData\Local\Programs\Python\Python310\lib\threading.py", line 966 in _bootstrap ... File "C:\Program Files\JetBrains\PyCharm 2021.1\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18 in execfile File "C:\Program Files\JetBrains\PyCharm 2021.1\plugins\python\helpers\pydev\pydevd.py", line 1483 in _exec File "C:\Program Files\JetBrains\PyCharm 2021.1\plugins\python\helpers\pydev\pydevd.py", line 1476 in run File "C:\Program Files\JetBrains\PyCharm 2021.1\plugins\python\helpers\pydev\pydevd.py", line 2164 in main File "C:\Program Files\JetBrains\PyCharm 2021.1\plugins\python\helpers\pydev\pydevd.py", line 2173 in
Process finished with exit code -1073741819 (0xC0000005)
Upvotes: 19
Views: 9753
Reputation: 15
i had exactly the same issue, what works for me right now , is to disable "attach to subprocess automatically" in the pycharm debugger settings.
no idea why it works exactly...
Upvotes: 0
Reputation: 1849
Disabling all breakpoints fixed it for me:
Then I was able to set new ones.
Upvotes: 23
Reputation: 19
Removing the breakpoints did not solve this for me. Moving from Python 3.10 to Python 3.11 did.
Upvotes: 1