1

Is there any way to set VScode in a way that it shows errors in real time? So far I can only see them after compiling.

I'm running VScode with WSL and I have C/C++ themes installed.

I already made sure that C_Cpp: Error Squiggles is enabled.

Here is the content of my "c_cpp_properties.json" file:

{
"configurations": [
    {
        "name": "Linux",
        "includePath": [
            "${workspaceFolder}/**"
        ],
        "defines": [],
        "compilerPath": "/usr/bin/gcc",
        "cStandard": "c17",
        "cppStandard": "gnu++17",
        "intelliSenseMode": "linux-gcc-x64"
    }
],
"version": 4
}
2
  • Is there any way? .. compile from the integrated terminal? That's a way. Commented Feb 17, 2023 at 22:17
  • By real time I mean while coding without having to compile.
    – c.leblanc
    Commented Feb 18, 2023 at 0:20

1 Answer 1

0

From my understanding, you need to have static code analysis setup to lint your code. With the C/C++ extension installed you can do this.

Open the command palette and type C/C++: Run Code Analysis on All Files and click the cog to open that setting

From here you can map Ctrl+S to run this when you save the file manually.

OR

you could add "C_Cpp.codeAnalysis.runAutomatically": true to the settings.json file

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .