Press Release

How to fix: Please update includePath. Cannot open source file on VSCode

How to fix “Please update includePath.#include errors detected. Cannot open source file” error on VSCode? In this video, it also shows how to setup C/C++ development projects on visual studio code.

Steps to fix it:
With visual studio code C++ extension version 0.17.0 and higher:
In c_cpp_properties.json you can directly address your WSL compiler and include paths by using *nix-style paths and we will do the conversion to Windows paths for you.

If you have multiple distributions installed, we disambiguate the compilerPath by picking the one marked as Default when you run wslconfig.exe /l in a CMD or PowerShell window.

We continue to support Windows-style paths for these properties as outlined in the archived instructions if you prefer to use those.

“name”: “WSL”,
“intelliSenseMode”: “gcc-x64”,
“compilerPath”: “/usr/bin/gcc”,
“includePath”: [
“defines”: [],
“cStandard”: “c11”,
“cppStandard”: “c++17”

Earlier versions of the extension:
If you are on a build of Windows prior to 17110 and you have an older version of the C/C++ extension installed, use these instructions instead.

If you haven’t installed visual studio code on Ubuntu or on windows, checkout the below videos. Following videos shall show you how to download, install vscode, its recommended extensions and quick walkthough:


Thanks for watching

#VSCode #VSCodeErrors #KludgeBot