PyCharm pydevd debug crash
egmkang opened this issue · 8 comments
i'm using Python 3.7.5 x86-64: stackless-3.7.5-amd64.exe (26857280 Byte) (md5 f85ecddb2f4d83990ad764bd7c5c8aa8)
.
using PyCharm to debug a hello world
program, the python process wil crash, and error code is 0xC0000005
.
here is log:
D:\Stackless37\python.exe "C:\Program Files\JetBrains\PyCharm Community Edition 2021.1\plugins\python-ce\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 50654 --file D:/tttt/hello.py
Connected to pydev debugger (build 211.6693.115)
Process finished with exit code -1073741819 (0xC0000005)
Hello egmkang,
thank you for the report. The exit code 0xC0000005 indicates an access violation. Could you please provide the source code of D:/tttt/hello.py. Does the crash also happen without the debugger attached?
Regards
Anselm
just one lineprint("hello world")
, and use PyCharm to debug
this file, it will crash. run
this file is ok
I can reproduce the crash.
PyCharm - more precisely the debugger component pydevd - optionally uses the frame evaluation API "eval_frame" defined in PEP 523. Stackless can't support this API, because it evaluates frames quite differently than regular C-Python.
Fortunately there is a simple workaround: set the environment variable PYDEVD_USE_FRAME_EVAL=NO
:
set PYDEVD_USE_FRAME_EVAL=NO
"\Program Files\JetBrains\PyCharm Community Edition 2021.1.1\bin\pycharm64.exe"
A patch for pydevd to disable frame eval for Stackless would be good too.
pull request for pydevd created
I have this issue (i think) but setting PYDEVD_USE_FRAME_EVAL=NO did not work for me. I have created an issue: https://youtrack.jetbrains.com/issue/PY-48739
I have this issue (i think) but setting PYDEVD_USE_FRAME_EVAL=NO did not work for me. I have created an issue: https://youtrack.jetbrains.com/issue/PY-48739
First, double check, that Python actually sees the environment setting. Run:
import os
print(os.environ.get('PYDEVD_USE_FRAME_EVAL'))
You may also try the set the environment variable PYDEVD_USE_CYTHON=NO
. Previous versions of cython were not compatible with Stackless Python (see #168) and Pycharm uses cython.
Perfect, thanks, that solved my problem!
In the 'set environment variables' part of the run/debug dialog in PyCharm, i was separating the variables with "; " (space) instead of ";" (no space). This set the wrong (or no) variable. Umpfff.
Will also report to PyCharm issues.