问题描述
我喜欢 Visual Studio 代码.但主要问题是当我运行程序时,我在终端中得到一些不需要的输出
I love visual studio code . But the main problem is when i run a program, i get some unwanted output in the terminal
我附上了一张图片,其中不需要的输出用红线包裹.有什么办法可以摆脱终端中不需要的输出?
I attached an image, where the unwanted output is wrapped in red line.Is there any way to get rid of this unwanted output in the terminal ?
推荐答案
它对我有用
打开 Visual Studio Code 并点击 F1 打开命令面板
Open Visual Studio Code and Click F1 to open the command panel
搜索Preferences: Open Settings (JSON)
并打开它.它会打开一个settings.json
文件
search for Preferences: Open Settings (JSON)
and open it.It will open a settings.json
file
您应该会看到类似这样的内容
You should see something like this
{
"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
这篇关于VScode 终端中不需要的输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!