visual-studio-code - VScode 终端中不需要的输出

标签 visual-studio-code

我喜欢 Visual Studio 代码。但主要问题是当我运行程序时,我在终端中得到一些不需要的输出

我附上了一张图像,其中不需要的输出用红线包裹。有什么方法可以消除终端中的这种不需要的输出吗? enter image description here

最佳答案

它对我有用:

  • 打开 Visual Studio Code 并按 F1 打开命令面板
  • 搜索首选项:打开用户设置 (JSON) 并将其打开。它将打开一个 settings.json 文件
  • 您可能会看到类似这样的内容
{
    "editor.fontSize": 17,
    "code-runner.runInTerminal": true,
    "terminal.integrated.defaultProfile.windows": "PowerShell"
}
  • 粘贴上面的下面的代码 “terminal.integrated.defaultProfile.windows”:“PowerShell”
"terminal.integrated.profiles.windows": 
{
    "PowerShell": 
    {
        "source": "PowerShell",
        "args": ["-noLogo"]
    }
},
  • 在此之后,settings.json 应该是这样的
{
    "editor.fontSize": 17,
    "code-runner.runInTerminal": true,
    "terminal.integrated.profiles.windows": 
    {
        "PowerShell": 
        {
            "source": "PowerShell",
            "args": ["-noLogo"]
        }
    },
    "terminal.integrated.defaultProfile.windows": "PowerShell"
}
  • Ctrl+S 保存并关闭 settings.json

关于visual-studio-code - VScode 终端中不需要的输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69044391/

相关文章:

javascript - 如何在vscode扩展的状态栏中设置自定义图标和 Logo (设置StatusBar Message)?

android - 在 VS Code 上模拟 Android 时为 "Invalid Argument(s): Cannot find executable for null"- Mac OS X

visual-studio-code - 如何在 VSCode 1.55+ 中关闭窗口标题 git edit 状态

visual-studio-code - 我在构建 flutter 项目时如何将 dart 和 flutter 设置为默认值

visual-studio-code - 更漂亮/VSCode Eslint 奇怪的格式/语法破坏错误

r - 如何对 Radian 作为 R 的 VS Code 终端进行故障排除

reactjs - Visual Studio Code [eslint] 在 windows 上删除 'CR' [prettier/prettier]

visual-studio-code - 如何在编辑器操作工具栏中添加自定义图标

visual-studio-code - VScode 自动完成对 CSS 文件不起作用

python - VS 代码 : Tell pylint to ignore the next line?