【问题标题】:How to attach to running python script via PTVS at beginning of execution如何在执行开始时通过 PTVS 附加到正在运行的 python 脚本
【发布时间】: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


    【解决方案1】:

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

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-11-20
    • 2013-04-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-17
    相关资源
    最近更新 更多