如何隐藏 Visual Studio Code 终端中显示的文件路径 [英] How to hide the file path displaying in Visual Studio Code's terminal

查看:214
本文介绍了如何隐藏 Visual Studio Code 终端中显示的文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在终端上运行我的 python 代码后,它在第一行显示一些路径,然后在第二行显示我的代码的实际输出.我可以隐藏第一行以便只看到输出吗?

解决方案

  1. 您可以在 .vscode 文件夹中的 launch.json 中使用以下设置,并且 console": 设置显示代码调试结果.

<块引用>

控制台":内部控制台",

设置后,调试结果会显示在调试控制台"中;在 VSCode 中.

  1. 我们也可以将其设置为:

<块引用>

控制台":外部终端",

并且调试结果将显示在cmd"中.VSCode 外的窗口.它也只显示调试结果:

  1. VSCode默认使用:"console":"integratedTerminal",它在VSCode内部终端显示结果,并显示当前环境和运行文件的路径.立>

参考:控制台.

After I run my python code on the terminal, it displays a few paths in the 1st line and then the actual output of my code in the 2nd line. Can I hide the 1st line so I only see the output?

解决方案

  1. You could use the following settings in launch.json in the .vscode folder, and "console": sets the way the code debugging results are displayed.

"console": "internalConsole",

After setting it, the debugging result will be displayed in the "debug console" inside VSCode.

  1. We could also set it as:

"console": "externalTerminal",

and the debugging results will be displayed in the "cmd" window outside VSCode. It also only displays the debugging results:

  1. VSCode uses by default: "console": "integratedTerminal", it displays the results in the VSCode internal terminal, and displays the current environment and the path of the running file.

Reference: console.

这篇关于如何隐藏 Visual Studio Code 终端中显示的文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆