Python rpdb2:如何连接到pid

Python rpdb2:如何连接到pid,python,pdb,winpdb,Python,Pdb,Winpdb,我有一个wsgi应用程序,其代码中包含以下内容: import rpdb2; rpdb2.start_embedded_debugger("asdf") 现在使用rpdb2(不是winpdb!)我想连接到进程并开始调试 我不知道该怎么做。如何连接到正在运行的进程,或者如何使该进程连接到调试器?在rpdb2中使用命令: (我假设您希望连接到本地主机上运行的进程。否则您应该使用--host开关) $ ./rdb2 RPDB2 - The Remote Python Debugger, vers

我有一个wsgi应用程序,其代码中包含以下内容:

import rpdb2; rpdb2.start_embedded_debugger("asdf")
现在使用rpdb2(不是winpdb!)我想连接到进程并开始调试


我不知道该怎么做。如何连接到正在运行的进程,或者如何使该进程连接到调试器?

在rpdb2中使用命令:

(我假设您希望连接到本地主机上运行的进程。否则您应该使用--host开关)

 $ ./rdb2
 RPDB2 - The Remote Python Debugger, version RPDB_2_4_8,
 Copyright (C) 2005-2009 Nir Aides.
 Type "help", "copyright", "license", "credits" for more information.

 > password "debugger"
 Password is set to: "debugger"

 > attach
 Connecting to 'localhost'...
 Scripts to debug on 'localhost':

    pid    name
 --------------------------
    7772   myscript.py

 > attach 7772
 > *** Attaching to debuggee...
 > *** Debug Channel is encrypted.
 > *** Successfully attached to
 > *** 'myscript.py'.
 > *** Debuggee is waiting at break point for further commands.

 > go