Including problem for Arduino in VSCode

Hello everyone. Recently I got some problem about the Arduino Extension in VSCode.
I have a project on my old PC that developed using VSCode with Arduino extension.
Now I migrate to my new PC and I can't verify my code anymore.
Arduino can't find the libraries in my project folder.
However I can verify in Arduino IDE. I wonder how Arduino IDE found my local library folder and those files?
In VSCode, I know it's not the problem of c_cpp_properties.json because that's only for IntelliSense right?
Is there any setting for Arduino to find libraries in my local folder?
image
image

In case you haven't figured this out yet, it is c_cpp_properties.json. You should probably have a profile in there named Arduino or something of the like and in that profile you can use the option includePath to make sure all of your libraries are accessible.

Note mine is setup for windows so the paths are a bit different than yours but you get the idea.

Something like this:

configurations": [
        {
            "name": "Arduino",
            "compilerPath": "C:\\Users\\me\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino5\\bin\\avr-g++",
            "compilerArgs": [
                "-w",
                "-std=gnu++11",
                "-fpermissive",
                "-fno-exceptions",
                "-ffunction-sections",
                "-fdata-sections",
                "-fno-threadsafe-statics",
                "-Wno-error=narrowing"
            ],
            "intelliSenseMode": "gcc-x64",
            "includePath": [
                "C:\\Users\\me\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\megaavr\\1.8.8\\cores\\arduino\\api\\deprecated",
                "C:\\Users\\me\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\megaavr\\1.8.8\\cores\\arduino",
                "C:\\Users\\me\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\megaavr\\1.8.8\\variants\\nona4809",
                "C:\\Users\\me\\Documents\\Arduino\\libraries\\DHT_sensor_library",
                "C:\\Users\\me\\Documents\\Arduino\\libraries\\Adafruit_Unified_Sensor",
                "C:\\Users\\me\\Documents\\Arduino\\libraries\\Rtc_by_Makuna\\src"
            ],
etc, etc...
}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.