[英]Unwanted output in the terminal of VScode
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 ?我附上了一张图片,不需要的输出用红线包裹。有什么办法可以摆脱终端中不需要的输出?
It worked for me:它对我有用:
{
"editor.fontSize": 17,
"code-runner.runInTerminal": true,
"terminal.integrated.defaultProfile.windows": "PowerShell"
}
"terminal.integrated.defaultProfile.windows": "PowerShell"
"terminal.integrated.defaultProfile.windows": "PowerShell"
"terminal.integrated.profiles.windows":
{
"PowerShell":
{
"source": "PowerShell",
"args": ["-noLogo"]
}
},
{
"editor.fontSize": 17,
"code-runner.runInTerminal": true,
"terminal.integrated.profiles.windows":
{
"PowerShell":
{
"source": "PowerShell",
"args": ["-noLogo"]
}
},
"terminal.integrated.defaultProfile.windows": "PowerShell"
}
Install code runner extension安装代码运行器扩展
Go to Code Runner extensions settings转到 Code Runner 扩展设置
Search for Executor Map and then click Edit in settings.json Depending on the programing language that you use add the following instead of default one:搜索 Executor Map,然后单击 settings.json 中的 Edit 根据您使用的编程语言添加以下内容而不是默认语言:
"c": "cls && function prompt{">>"} && $Host.ui.rawui.foregroundcolor = "cyan" && cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt && echo `n && $Host.ui.rawui.foregroundcolor = "red"", "c": "cls && 函数提示符{">>"} && $Host.ui.rawui.foregroundcolor = "cyan" && cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt && echo `n && $Host.ui.rawui.foregroundcolor = "红色"",
In case you use C++ then just change "c": to "cpp": and be aware to to replace gcc to g++ or to clang++ in case you use clang如果您使用 C++,那么只需将 "c": 更改为 "cpp": 并注意将 gcc 替换为 g++ 或 clang++,以防你使用 clang
you can check my videos for detailed explanation您可以查看我的视频以获取详细说明
quick: https://youtu.be/yq8j3AsEOL0快速: https ://youtu.be/yq8j3AsEOL0
Detailed: https://youtu.be/WM5iW8SyGpk详解: https ://youtu.be/WM5iW8SyGpk
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.