如何在执行开始时通过 PTVS 附加到 运行 python 脚本

How to attach to running python script via PTVS at beginning of execution

我想附加到另一个程序 (.exe) 调用的 python 脚本。

我正在开发 python 脚本。

现在,我正在使用 (Python 2.7)

raw_input("Press Enter to continue and/or attach debugger...")

让脚本等待并附加调试器。

有没有方便的方法,比如C#

Debugger.Break()

(参见 )直接提示我附加已打开的 Visual Studio 实例? 手动附加(尤其是在进行多次运行时)需要一些时间。我经常这样做,我什至知道 Ctrl+Alt+P 可以打开附加对话框(然后单击程序列表,为 python 按 p,单击附加..)。

目前没有这样的东西。随意file a feature request