最佳答案
它对我有用:
- 打开 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/