'Using Visual Studio Code as C-Project editor only (IntelliSense)
I need help in understanding how to correctly use Visual Studio Code. I have an embedded C-Project with a quite "complicated" folder structure and want use VSC as a decent and fast code editor. I do not need support for compiling or debugging!
Therefor I installed the C/C++ extension from Microsoft to use IntelliSense, for code completion, suggestions, etc. Also the project contains lots of files which I want not within the VSC explorer (.pdfs, .object files, etc).
So far as I understand it I can just create a workspace and save it anywhere and add the folders which I want to see in the VSC explorer within the "myProject.code-workspace" file:
{
"path": "C:/User/me/Project/Application/"
},
{
"path": "C:/User/me/Project"
},
and so on...
within .vscode/c_cpp_properties.json I would add the paths to my includes and this is where the problems start...
IntelliSense does not recognize the includes I added in "includePath". I want the .vscode folder on the same level as the workspace file, which shouldn't be a problem or should it? If I click on the lightbulb in the code, where it asks to edit the include path, I have to select one of the folders defined in the workspace file, where then a new .vscode/c_cpp_properties.json file is generated. That's why I've tried to add the path of the workspace file, to the workspace itself, so the .vscode folder can be created there, but then again intellisense is not able to find the include files, although the paths are correct.
for example:
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/Os/Inc/**",
"${workspaceFolder}/../../Appl/**"
],
I might have misunderstood the concept of VSC or the C/C++ extension. I have already read the documentation but am still confused.
I want to use VSC because it is a lightweight and fast editor with lots of possible extensions, I do not need and want an IDE but I do not get the concept at the moment. Could you maybe enlighten me? :)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
