2017-03-31 44 views
0

在Windows 7上,我有Eclipse Neon(4.6.3)與Liclipse/PyDev,我使用Python 2.7.13的自定義64位調試版本(python_d.exe,使用pcbuild.sln使用Visual Studio構建)。在大多數情況下,這個Python的調試版本可以與PyDev一起使用 - 我可以將它配置爲解釋器並進行運行/調試會話。但是,「附加到進程」功能不起作用。如果我在系統上的某個地方運行「python_d」的過程,並嘗試「附加到進程」中的PyDev,會發生以下情況:Pydev - 附加到python_d進程(Python調試版本)不起作用

  • 「過程輸出」對話窗口顯示如下:

Connecting to 64 bits target Injecting dll Dll injected Allocating code in target process Writing code in target process Allocating return value memory in target process Injecting code to target process Waiting for code to complete Attach finished successfully. [127156 refs] Process finished with exitValue: 0

  • 一個Windows崩潰對話框出現說:「python_d.exe已停止工作」
  • 的「python_d」過程中,我試圖附加在其Ø得到這個消息utput然後崩潰:Fatal Python error: UNREF invalid object

相反,當我使用Python的常規安裝版本(我在PyDev中配置爲單獨的解釋器)時,附着機制起作用。

Python的調試版本是否應該與PyDev調試器附加機制配合使用?這是PyDev中的錯誤嗎? PyDev是否會錯誤地使用僅適用於發佈版本的Python的DLL? PyDev是否需要以不同的方式從源代碼構建,以便爲此目的支持Python的調試版本?

回答

0

調試版本並不真正被支持(Python ABI與發佈時的調試以及附件的代碼是作爲期望Python發行版的dll發佈的)不同。

作爲說明,它的代碼依賴於https://github.com/fabioz/PyDev.Debugger/tree/master/pydevd_attach_to_process/dll - 如果您確實認爲這對您是必須的,那麼您可以嘗試將其更改爲使用Python的調試版本。

最具體地說,https://github.com/fabioz/PyDev.Debugger/blob/master/pydevd_attach_to_process/dll/python.h可能需要適應調試版本。

相關問題