[英]How can I get rid of the path shown in Vscode terminal while using Python?
When I try running a python code the output terminal displays the location where.py file is located in the white-colored text followed by the "&" sign and then the place where Python is installed as well as the file containing the Python code in blue text. When I try running a python code the output terminal displays the location where.py file is located in the white-colored text followed by the "&" sign and then the place where Python is installed as well as the file containing the Python code in蓝色文本。 I have no problem with the white text but earlier my VScode did not display this blue text, it's cluttering the output, is there any way to get rid of it.
我对白色文本没有问题,但早些时候我的 VScode 没有显示这个蓝色文本,它把 output 弄乱了,有什么办法可以摆脱它。 https://i.stack.imgur.com/CUeL4.jpg
https://i.stack.imgur.com/CUeL4.jpg
At present, there is no direct way to omit the path information of "Terminal" in VS Code.目前没有直接的方法可以在VS Code中省略“Terminal”的路径信息。 This information shows us the path of the python interpreter used and the path of the executed file when executing the run command.
该信息向我们显示了使用的 python 解释器的路径以及执行运行命令时执行文件的路径。
Workarounds:解决方法:
Please use the setting in " launch.json ": "console": "internalConsole",
then click F5
to debug the code, "DEBUG CONSOLE" will only display the result.请使用“ launch.json ”中的设置:
"console": "internalConsole",
然后按F5
调试代码,“DEBUG CONSOLE”只会显示结果。
You could use the VS Code extension "Code Runner" and use the settings in " settings.json ": "code-runner.showExecutionMessage": false,
then click "Run Code":您可以使用 VS Code 扩展“Code Runner”并使用“ settings.json ”中的设置:
"code-runner.showExecutionMessage": false,
然后单击“Run Code”:
Reference: Python debug configurations in Visual Studio Code .参考: Python Visual Studio Code 中的调试配置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.