Unable to display frame variables (PyCharm remote debugger)(无法显示帧变量(PyCharm 远程调试器))
问题描述
有什么问题?
我在 PyCharm(2016.1.4 版)中使用远程解释器(不是调试服务器!)进行远程调试,如下所述:jetbrains 网站.
I set up in PyCharm (version 2016.1.4) remote-debugging using the remote interpreter (not Debug Server!) as described here: jetbrains website.
当我在调试模式下运行时,程序应该在断点处停止.但是,在变量"窗口中不显示变量.相反,我收到以下错误:
When I run in Debug mode the program stops at the break point as it should. But, in the Variables window the variables are not displayed. Instead I get the following Error:
无法显示帧变量
我猜这是同样的问题:链接
我尝试了什么?
我发现这个 链接 有一个可能的解决方案,但它对我不起作用.基于这个解决方案,我修改了我的 helpers/pydev/_pydevd_bundle/pydevd_constants.py
文件如下:
I found this link with a possible solution, but it doesn't work for me. Based on this solution, I modified my helpers/pydev/_pydevd_bundle/pydevd_constants.py
file as follows:
发件人:
try:
SUPPORT_GEVENT = os.getenv('GEVENT_SUPPORT', 'False') == 'True'
except:
# Jython 2.1 doesn't accept that construct
SUPPORT_GEVENT = False
# At the moment gevent supports Python >= 2.6 and Python >= 3.3
USE_LIB_COPY = SUPPORT_GEVENT and
((not IS_PY3K and sys.version_info[1] >= 6) or
(IS_PY3K and sys.version_info[1] >= 3))
致:
try:
SUPPORT_GEVENT = os.getenv('GEVENT_SUPPORT', 'False') == 'True'
try:
import gevent
SUPPORT_GEVENT = True
except:
SUPPORT_GEVENT = False
except:
# Jython 2.1 doesn't accept that construct
SUPPORT_GEVENT = False
# At the moment gevent supports Python >= 2.6 and Python >= 3.3
USE_LIB_COPY = SUPPORT_GEVENT and
((not IS_PY3K and sys.version_info[1] >= 6) or
(IS_PY3K and sys.version_info[1] >= 3))
但它仍然不起作用.我仍然看不到变量.
but it still doesn't work. I still cannot see the variables.
有人知道怎么解决吗?
推荐答案
在最新版本的 PyCharm 中,该选项已移至主设置对话框.您可以在设置 | 下启用它.Python 调试器 |Gevent 兼容调试.
In recent versions of PyCharm, the option has moved to the main settings dialog. You can enable it under Settings | Python Debugger | Gevent compatible debugging.
参考
这篇关于无法显示帧变量(PyCharm 远程调试器)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:无法显示帧变量(PyCharm 远程调试器)
基础教程推荐
- 筛选NumPy数组 2022-01-01
- 用于分类数据的跳跃记号标签 2022-01-01
- Python kivy 入口点 inflateRest2 无法定位 libpng16-16.dll 2022-01-01
- 何时使用 os.name、sys.platform 或 platform.system? 2022-01-01
- 如何让 python 脚本监听来自另一个脚本的输入 2022-01-01
- 使用PyInstaller后在Windows中打开可执行文件时出错 2022-01-01
- 如何在海运重新绘制中自定义标题和y标签 2022-01-01
- 在 Python 中,如果我在一个“with"中返回.块,文件还会关闭吗? 2022-01-01
- Dask.array.套用_沿_轴:由于额外的元素([1]),使用dask.array的每一行作为另一个函数的输入失败 2022-01-01
- 线程时出现 msgbox 错误,GUI 块 2022-01-01