#VSCode- Add #AzureIoT source files to your C++ settings in #VisualStudioCode

Hi!

Context: You may call me picky, but I like to read source code. And if I know that I have the source code, but I can reach it, I can’t code in happy mode.

So, I’m back to Azure IoT and while I was browsing the Project Catalog for my DevKit device. I hold myself in the [Get Started – Connect IoT DevKit AZ3166 to Azure IoT Hub] section thanks to this warning.

visual studio code mxchip get started cant find include errors

Don’t get me wrong, once you installed Visual Studio Code, Arduino and the complete set of dependencies; you can build and deploy everything. However, I need my peek definition and the following error is a stopper for me

visual studio code include file not found in browse.path
Error: Visual studio code include file not found in browse.path 

The main problem is that the C++ extension can’t found any of the Azure IoT files. So, we need to add the path to VSCode settings. Lucky for us, the tip bulb will directly guide us to this option

visual studio code edit browse path setting

We only need to add this path to the C++ settings. Of course, check your Arduino version and your username

C:\Users\{user name}\AppData\Local\Arduino15\packages\AZ3166\**

And that’s it! Peek definition and more is available now

visual studio code c++ peek definition

Happy coding!

Greetings @ Burlington

El Bruno

Resources

Advertisements