VS Code Python调试控制台不完整

时间:2017-11-27 18:51:46

标签: python python-2.7 visual-studio-code

在调试器中运行python脚本无法输出sys.stderr。当我的脚本在终端崩溃时,我看到完整的堆栈跟踪,而当它崩溃时,调试它只是完成而没有任何输出。

RedirectOutput应该这样做,

https://code.visualstudio.com/docs/python/debugging

然而它失败了。 我在配置中运行debugOptions,如下所示

"debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput"
            ]

顺便运行python 2.7

1 个答案:

答案 0 :(得分:0)

我自己修好了。这是一个混合的设置。

现在它将所有输出传输到终端而不是debug_console,并显示每个通道标准输出和输出。标准错误

"debugOptions": [
            "WaitOnAbnormalExit",
            "WaitOnNormalExit"
        ],
        "console": "integratedTerminal",
        "stopOnEntry": false