【发布时间】:2015-09-29 08:38:39
【问题描述】:
我想附加到另一个程序 (.exe) 调用的 python 脚本。
我正在开发 python 脚本。
现在,我正在使用 (Python 2.7)
raw_input("Press Enter to continue and/or attach debugger...")
让脚本等待并附加调试器。
有什么方便的方法,比如C#
Debugger.Break()
(请参阅https://stackoverflow.com/a/105599/586754)直接提示我附加已打开的 Visual Studio 实例?手动附加(尤其是在多次运行时)需要一些时间。我经常这样做,我什至知道 Ctrl+Alt+P 打开附加对话框(然后单击程序列表,按 p 表示 python,单击附加..)。
【问题讨论】:
标签: python python-2.7 debugging visual-studio-2013 ptvs