如何在 .cpp 文件的 VSCode 编辑器中显示警告? [英] How to show warnings in VSCode editor for a .cpp file?
问题描述
是否可以通过某种方式调整 VSC 以在文本编辑器中查看 GCC 警告?
请参阅下面的屏幕截图 - 它仅在编辑器中显示错误.
Is it possible to tweak VSC somehow to see GCC warnings in the text editor?
Refer to the screenshot below - it shows only errors in the editor.
我使用的是安装了 C/C++ 扩展 0.26.3 的 1.43.2 版本.
尝试将 -Wall
编译器标志添加到 tasks.json
中的args",但没有帮助.
I'm using 1.43.2 version with C/C++ extension 0.26.3 installed.
Tried adding -Wall
compiler flag to "args" in tasks.json
but it didn't help.
以下是我的设置:
{
"editor.fontSize": 13,
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 100,
"files.insertFinalNewline": true,
}
推荐答案
警告和错误显示在问题面板中.你可以在上面看到Problems 4
.您可能需要安装 Visual Studio IntelliCode
或 C++ Intellisense
以帮助您在编译前识别错误.
The warning and errors are shown in Problem Panel.
You can see Problems 4
on it.
You might need to install Visual Studio IntelliCode
or C++ Intellisense
to help you identify mistakes before compilation.
这篇关于如何在 .cpp 文件的 VSCode 编辑器中显示警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!