Pretty much what the title says, I would like to be able to connect to a python process running under paster or uwsgi and utilize pdb functionality.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Using winpdb, you can attach to a running process like this:
Insert
import rpdb2; rpdb2.start_embedded_debugger('mypassword')
inside your script.
- Launch your script (through paster or uwsgi) as usual.
- Run winpdb
- Click File>Attach
- Type in password (e.g. "mypassword"), select the process.
- To detach, click File>Detach. The script will continue to run, and can be attached to again later.