简体   繁体   English

如何在 Visual Studio 代码中抑制额外的 output?

[英]How to suppress the extra output in visual studio code?

I'm using python 3.7 plugin in visual studio code for Windows.我在 Windows 的 Visual Studio 代码中使用 python 3.7 插件。 For some reason I get an extra output when debugging my code.出于某种原因,在调试我的代码时,我得到了一个额外的 output。 How can I reconfigure the python plugin to hide this output?如何重新配置 python 插件以隐藏此 output?

PS C:\Users\Aleksandr\Desktop\Python_ex\Ch2>  ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'python' 'c:\Users\Aleksandr\.vscode\extensions\ms-python.python-2018.4.0\pythonFiles\PythonTools\visualstudio_py_launcher.py' 'c:\Users\Aleksandr\Desktop\Python_ex\Ch2' '52829' '34806ad9-833a-4524-8cd6-18ca4aa74f14' 'RedirectOutput,RedirectOutput' 'c:\Users\Aleksandr\Desktop\Python_ex\Ch2\variables_finished.py'

You can't hide the terminal command as that's how the debugger is launched.您不能隐藏终端命令,因为这就是调试器的启动方式。 You may be able to configure your shell to somehow hide it, though I'm quite sure how.您也许可以配置您的 shell 以某种方式隐藏它,尽管我很确定如何。

Honestly, I suggest you get used to it, as it can show you what exactly runs behind.老实说,我建议你习惯它,因为它可以告诉你到底是什么落后了。 But if you really annoy with the outputs, I suggest you add "console": "internalConsole" setting in launch.json file.但如果你真的对输出感到恼火,我建议你在 launch.json 文件中添加 "console": "internalConsole" 设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM