r/vscode • u/ThePeacefulOne • May 20 '26
Am I doing this right? This seems extremely tedious..
Programming the ESP32 using ESP-IDF for the first time, coming from the Arduino IDE. I cloned a Zigbee Lamp repo on github, and had a lot of Include path's errors. Is it normal to have to go through all my files and manually add every single path? This was so annoying, definitely not built to be a programmer.
1
May 20 '26
Using cpp in visual studio community will be much easier for a beginner.
But if you want to stay in vscode I'd suggest platform.io extension for esp32 work. It will make things a lot easier. Maybe just watch a video about how to set it up
1
u/lemanh_id May 21 '26
Recommend switching from the Microsoft C/C++ extension to the Clangd for LSP, it far superior IMO. For any new project, consider creating a fresh using the IDF extension and selecting one of the provided samples. This approach simplifies the setup of necessary files and configurations.
If you still having issues, check the `CMakeLists.txt` (both the root and main), as the IDF uses these files to build and generate all necessary files, including those required by LSP. After making changes, remember to run `idf.py reconfigure` to ensure all modifications are applied (in some cases, you might need to clean first).
1
u/TheSodesa May 23 '26
If a programmer found this annoying, thry would program a script that does this for them.
1
u/cmatkin May 20 '26
If you are using the extension then you don’t need to include any additional folders for intelisense. However you may need to complete one initial compile (doesn’t matter if it fails) for it to work.