Page 1 of 1
VS Code help
Posted: Wed Feb 05, 2025 4:45 am
by klaatu2
I'm messing with an ESP32 example
It compiles, flashes and runs fine
But in main.c, VS code underlines in RED all the include files and when hovered over: "Can't open source file"
While ESP-IDF compiles and apparently knows the path, VS code does not.
How do you fix this, so that I can hyperlink to these files from within main.c

Re: VS Code help
Posted: Wed Feb 05, 2025 8:23 pm
by MicroController
Sometimes, CTRL+left-click on the include name does make VSCode search for and find the right file.
Another thing to try: F1, "> C/C++: Change Configuration Provider..." -> CMake Tools
Re: VS Code help
Posted: Wed Feb 05, 2025 11:01 pm
by klaatu2
Under "Change Configuration Provider", there is only one item listed: (None)
Re: VS Code help
Posted: Thu Feb 06, 2025 12:35 am
by MicroController
Then you may want to install the cmake extension and check again.
Re: VS Code help
Posted: Thu Feb 06, 2025 2:32 am
by klaatu2
" install the cmake extension" ?
Do you mean the "Microsoft C/C++ Extension Pack"?
I already have the "Microsoft C/C++ Visual Studio Code", installed
I also see the "CMake Extension Pack" by mischelebuha, and "CMake Tools" by Microsoft.
Not clear which you mean
Re: VS Code help
Posted: Thu Feb 06, 2025 2:45 am
by username
Did you try creating a new project and see if everything works ok first ?
Re: VS Code help
Posted: Wed Feb 12, 2025 5:46 pm
by klaatu2
The issue is directly related to the Microsoft C/C++ Intellisense extension.
There needs to be a c_cpp_properties.json file in the vscode folder.
Details here:
https://docs.espressif.com/projects/vsc ... oject.html
I manually created the file and inserted the file structure detailed at the link above, and hyperlinking to include files all work now.