Vishesh Varma
Vishesh Varma

Reputation: 38

vscode configuration for Arduino reverts back to default after compiling

I'm using VSCode Arduino extension to develop and program my Raspberry Pi Pico. I've installed everything correctly, and it is compiling as it should, but I get a spell check red underline in below the first line mentioning 2 issues:

To fix this, I added these couple of lines in the includePath of c_cpp_properties.json:

"c:\\users\\USER\\appdata\\local\\arduino15\\packages\\rp2040\\tools\\** ",
"c:\\users\\USER\\appdata\\local\\arduino15\\packages\\rp2040\\hardware\\** "

That seemed to fix the issue, but every time I compile the code, the configuration gets reset, and it goes back to being without these couple of lines. All of the changes that I make in the file, or through the C/C++ configuration tabs.

How do I make it so that it doesn't overwrite my changes in the configuration with the default ones?

Upvotes: 0

Views: 885

Answers (1)

Vishnu M Aiea
Vishnu M Aiea

Reputation: 1

The VS Code Arduino extension can generate intellisense data automatically whenever you compile the code. This feature is useful when you want to change the board type at times, for example when testing the same code for different boards. This is the same feature that is rewriting your additions to the file. You can disable it with the extension setting called "Arduino: Disable Intelli Sense Auto Gen", after adding the new paths to the file.

I have encountered the same problem you described. VS Code is not yet good at fetching all dependencies of the Pico C/C++ SDK. Intelli sense will complain about a lot of things even though the code compiles just fine.

Upvotes: 0

Related Questions