2016-09-27 62 views
1

有什麼問題?無法顯示幀變量(PyCharm遠程調試器)

我使用遠程解釋器(不是調試服務器!)在PyCharm(版本2016.1.4)遠程調試中設置:jetbrains website

當我在調試模式下運行時,程序停止在中斷點,因爲它應該。但是,在變量窗口中,變量不顯示。相反,我得到以下錯誤:

Unable to display frame variables

我想這是同樣的問題:link

我是怎麼試試嗎?

我發現這個link有一個可能的解決方案,但它不適用於我。在此基礎上的解決方案,我修改了helpers/pydev/_pydevd_bundle/pydevd_constants.py文件,如下所示:

來源:

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)) 

,但它仍然無法正常工作。我仍然看不到變數。

任何人有任何想法如何解決它?

回答

2

在最新版本的PyCharm中,該選項已移至主設置對話框。您可以在設置|下啓用它Python調試器| Gevent兼容調試。

Reference