【发布时间】:2017-11-27 18:51:45
【问题描述】:
在调试器中运行 python 脚本无法输出sys.stderr。当我的脚本在终端中崩溃时,我会看到完整的堆栈跟踪,而当它在调试时崩溃时,它只是完成而没有任何输出。
RedirectOutput 应该这样做,
https://code.visualstudio.com/docs/python/debugging
但它失败了。
我在我的配置中运行debugOptions,如下所示
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
]
顺便运行python 2.7
【问题讨论】:
-
虽然我可以解决这个问题,但调试控制台和终端之间的组合或区别在 VS Code 中并没有得到很好的解决
标签: python python-2.7 visual-studio-code