Error: "Configure your Intellisense settings to help find missing headers" (was: Arduino extension required?)

Trying to build a simple project in workbench. Compile seems to work, but VSCode lists several “problems”:

image
These also don’t work with intellisense. Shouldn’t workbench have installed the right extension(s)? Do I need to install an Arduino extension to resolve these?

there is an arduino extension. i have 0.2.25. i’m not sure that installing it would solve your issues but it’s gonna come in to play at some point. those errors seem more related to the particle code. although i’m not the one to comment on your code i’m sure if you post it others can help. you also could do a particle audit on your environment to see if it can help identify errors in your setup.

These aren’t compile warnings or errors. The project compiles. This seems to be VSCode itself saying it doesn’t recognize these identifiers. So, for instance, intellisense doesn’t work for these. Most of these identifiers are from the Arduino world (wiring). But “Particle” is obviously from the Particle world. It seems like something should have been configured during workbench setup but wasn’t. Anyone know what the problem is? I’m hoping someone has a solid recommendation rather than me just experimenting with the VSCode config on my own…

You need to have #include <Particle.h> in all your .h and/or .cpp files.
Although I’ve never seen this behaviour this might be due to the fact that your .ino file hasn’t been preprocessed to add that include.

What happens when you add that line to your .ino file?

We can also tag @m_m for that.

1 Like

When I include particle.h I get the following (instead of the other problems):

It is supposed Particle.h witch capital P - just the way I wrote it above.

#include <Particle.h> gave the same result.

Is the workbench installer supposed to update vscode’s includePath?

hey there :wave:

thanks for trying Workbench, sorry for the bumps :pray:

intellisense can be a bit finicky - we continue to chase down issues. a couple of things to try:

  1. close and re-open VSCode
  2. run the C/C++: Reset Intellisense Database command (ctrl+shift+p, then start typing the command name)
  3. try adding "C_Cpp.loggingLevel": "Debug" to your project’s ./vscode/settings.json file (or use VSCode’s UI - File > Preferences > Settings then search for “logging level”)
  4. with logging level set to “Debug”, select the “C/C++” entry in the Output panel’s drop-down menu (top-right next to the panel’s “close” button), open your .ino / .cpp, and share the log it produces.
  5. run the Particle: Audit Environment command and share the non-sensitive parts

all of the steps above assume you are working within a Particle project (docs)

after each step, verify that you are still seeing inaccurate issues in the “Problems” tab within VSCode.

let us know what you find - thanks again :+1:

Thanks @m_m, I followed those steps and here’s the output I got:

textDocument/codeAction: 10
cpptools/activeDocumentChange
cpptools/textEditorSelectionChange
cpptools/textEditorSelectionChange
textDocument/codeAction: 11
idle loop: reparsing the active document
Checking for syntax errors: file:///c%3A/Users/name/Documents/Particle/projects/ArgonTest02/src/ArgonTest02.ino
queue_update_intellisense for files in tu of: C:\USERS\NAME\DOCUMENTS\PARTICLE\PROJECTS\ARGONTEST02\SRC\ARGONTEST02.INO
errorSquiggles count: 2

…and here are the current “Problems” listed:

the include path is in c_cpp_properties.json if you do not have it listed in your workspace you need to run C/Cpp: Edit configurations from command palate. btw, if you have not already you might want to install the Microsoft C/C++ extension

hi @gorsat

unfortunately, that’s not the full log - either you didn’t run the C/C++: Reset Intellisense Database command or you didn’t (re)open your .ino / .cpp file (intellisense runs its scans, etc when a qualified file is first opened).

the full log will show interesting things like:

Custom configuration provider 'particle-vscode-core' registered
Custom configurations received:
  uri: file:///Users/me/Sites/particle/workbench-test-projects/stroby/src/stroby.ino
  config: {
  "defines": [
    "PLATFORM_NAME=photon",
    "PLATFORM_ID=6",
    "PLATFORM_THREADING=1"
  ],
  "includePath": [
    "${workspaceFolder}/**",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/user/inc",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/wiring/inc",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/system/inc",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/services/inc",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/communication/src",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal/inc",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal/shared",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal/src/photon",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal/src/stm32f2xx",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal/src/stm32",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal/src/photon/include",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal/src/photon/wiced/security/BESL/host/WICED",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal/src/photon/wiced/security/BESL/include",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal/src/photon/wiced/security/BESL",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal/src/photon/wiced/security/BESL/crypto",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal/src/photon/wiced/WWD/include",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal/src/photon/wiced/platform/include",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal/src/photon/wiced/platform/GCC",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal/src/photon/wiced/security/BESL/supplicant",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal/src/photon/libraries/crypto",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/platform/shared/inc",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/platform/MCU/STM32F2xx/CMSIS/Include",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/platform/MCU/STM32F2xx/CMSIS/Device/ST/Include",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/platform/MCU/shared/STM32/inc",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/dynalib/inc",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/user/libraries",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/rt-dynalib/inc"
  ],
  "forcedInclude": [
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/user/inc/Particle.h",
    "/Users/me/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal/src/stm32f2xx/deepsleep_hal_impl.h"
  ],
  "compilerPath": "/Users/me/.particle/toolchains/gcc-arm/5.3.1/bin/arm-none-eabi-gcc",
  "intelliSenseMode": "gcc-x64",
  "standard": "c++11"
}

amongst lots of other stuff :wink:

also, don’t forget to run the Particle: Audit Environment command and share the non-sensitive parts :+1:

1 Like

Particle Workbench provides configuration to the Microsoft C/C++ extension programmatically so you shouldn’t have a ./.vscode/c_cpp_properties.json file. if you do, try deleting it (or if you want to keep it’s contents, move it somewhere outside of you project directory temporarily).

Okay. I closed the file. Closed vscode. Reopened vscode. Re-opened the file. The output is below. I’m missing all the stuff about the particle configuration provider.

textDocument/codeAction: 2
cpptools/activeDocumentChange
cpptools/textEditorSelectionChange
cpptools/textEditorSelectionChange
textDocument/didOpen
Checking for syntax errors: file:///c%3A/Users/name/Documents/Particle/projects/ArgonTest02/src/ArgonTest02.ino
sending compilation args for C:\USERS\name\DOCUMENTS\PARTICLE\PROJECTS\ARGONTEST02\SRC\ARGONTEST02.INO
  include: C:\Users\name\Documents\Particle\projects\ArgonTest02
  define: _DEBUG
  define: UNICODE
  define: _UNICODE
  other: --header_only_fallback
  stdver: --ms_c++latest
  intelliSenseMode: msvc
queue_update_intellisense for files in tu of: C:\USERS\name\DOCUMENTS\PARTICLE\PROJECTS\ARGONTEST02\SRC\ARGONTEST02.INO
textDocument/codeAction: 3
errorSquiggles count: 2
Tag Parser will be used for IntelliSense operations in: file:///c%3A/Users/name/Documents/Particle/projects/ArgonTest02/src/ArgonTest02.ino
textDocument/codeAction: 4
0 include path suggestion(s) discovered.
idle loop: reparsing the active document
Checking for syntax errors: file:///c%3A/Users/name/Documents/Particle/projects/ArgonTest02/src/ArgonTest02.ino
queue_update_intellisense for files in tu of: C:\USERS\name\DOCUMENTS\PARTICLE\PROJECTS\ARGONTEST02\SRC\ARGONTEST02.INO
errorSquiggles count: 2
textDocument/hover: 5
using Tag Parser for quick info

i still have not wrapped my head around what particle workbench does as far as configuration but it dawned on me that if in fact particle was “setting up” the environment there would not be the include path errors. particle setup should ask me where my include folder is or tell me where it has been programmed to be, imo. what i did is read the instructions for the c/c+ extension that i linked to and by using the c_cpp_properties.json for my include directory the errors stopped and additionally if i added libraries to the include directory they were found. go figure. so, i’ll stop doing all that and delete the .json as you say and see what happens. thanks.

also, don’t forget to run the Particle: Audit Environment command and share the non-sensitive parts :+1:

i still have not wrapped my head around what particle workbench does as far as configuration

you can see what we provide in the log example i provided above - you can follow the steps i listed here to enable full debug logging from the C/C++ extension in your environment:

there's also a high-level explainer over here:

https://docs.particle.io/tutorials/developer-tools/workbench/#intellisense

TL;DR - we configure intellisense to use your project's settings, our Device OS headers (the paths starting w/ ~/.particle/toolchains), as well as any headers within your project (the ${workspaceFolder}/** entry)

Oops. Sorry. I totally missed the audit part. Here you go:

*** WARNING: MAY CONTAIN CONFIDENTIAL INFORMATION - PLEASE SANITIZE BEFORE SHARING ***
To report an issue, visit:
https://community.particle.io/t/information-how-to-report-bugs-and-provide-feedback/44245

{
    "username": "xxx",
    "workspace": {
        "name": "ArgonTest02",
        "isWorkspace": false,
        "folders": [
            {
                "location": "c:\\Users\\xxx\\Documents\\Particle\\projects\\ArgonTest02",
                "settings": {
                    "firmwareName": "deviceOS",
                    "firmwareVersion": "1.0.1",
                    "targetDevice": "Argon",
                    "targetPlatform": "photon",
                    "compileButtonAction": "localAppDeviceOS",
                    "flashButtonAction": "localAppDeviceOS",
                    "disableWelcomeScreen": false,
                    "disableLocalCompilerDirtyCheck": false
                },
                "files": [
                    ".vscode",
                    ".vscode\\ipch",
                    ".vscode\\settings.json",
                    "project.properties",
                    "README.md",
                    "src",
                    "src\\ArgonTest02.cpp",
                    "src\\ArgonTest02.ino",
                    "target",
                    "target\\ArgonTest02.bin",
                    "target\\ArgonTest02.bin.crc_block",
                    "target\\ArgonTest02.bin.no_crc",
                    "target\\ArgonTest02.dfu",
                    "target\\ArgonTest02.elf",
                    "target\\ArgonTest02.hex",
                    "target\\ArgonTest02.lst",
                    "target\\ArgonTest02.map",
                    "target\\obj"
                ]
            }
        ]
    },
    "cli": {
        "binpath": "C:\\Users\\xxx\\.vscode\\extensions\\particle.particle-vscode-core-1.2.2\\src\\cli\\bin\\windows\\amd64\\particle.exe",
        "ok": true,
        "version": "1.40.0",
        "installed": 1553289197570
    },
    "localCompiler": {
        "dependencies": [
            "deviceOS@1.0.1",
            "gcc-arm@5.3.1",
            "buildtools@1.0.1",
            "buildscripts@1.2.0",
            "openocd@0.10.0-particle.1"
        ]
    },
    "platform": {
        "os": "windows",
        "type": "Windows_NT",
        "release": "10.0.17763",
        "arch": "x64",
        "path": {
            "key": "Path",
            "value": "C:\\Program Files (x86)\\Razer Chroma SDK\\bin;C:\\Program Files\\Razer Chroma SDK\\bin;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\redist\\ia32\\compiler;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\redist\\intel64\\compiler;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\QuickTime\\QTSystem\\;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files (x86)\\Common Files\\Acronis\\VirtualFile\\;C:\\Program Files (x86)\\Common Files\\Acronis\\VirtualFile64\\;C:\\Program Files (x86)\\Common Files\\Acronis\\FileProtector\\;C:\\Program Files (x86)\\Common Files\\Acronis\\FileProtector64\\;C:\\Program Files (x86)\\Common Files\\Acronis\\SnapAPI\\;C:\\Program Files\\Git\\cmd;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\PuTTY\\;C:\\Users\\xxx\\AppData\\Local\\Programs\\Python\\Python36\\Scripts\\;C:\\Users\\xxx\\AppData\\Local\\Programs\\Python\\Python36\\;C:\\Users\\xxx\\.cargo\\bin;C:\\Users\\xxx\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\Microsoft VS Code\\bin;C:\\Users\\xxx\\AppData\\Roaming\\Python\\Python36\\Scripts;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NGX;%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\System32\\Wbem;%SYSTEMROOT%\\System32\\WindowsPowerShell\\v1.0\\;%SYSTEMROOT%\\System32\\OpenSSH\\;C:\\Users\\xxx\\AppData\\Local\\Programs\\Python\\Python36\\Scripts\\;C:\\Users\\xxx\\AppData\\Local\\Programs\\Python\\Python36\\;C:\\Users\\xxx\\.cargo\\bin;C:\\Users\\xxx\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\Microsoft VS Code\\bin;C:\\Users\\xxx\\AppData\\Roaming\\Python\\Python36\\Scripts;C:\\Users\\xxx\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\xxx\\AppData\\Local\\particle\\bin;C:\\OpenSSL-Win32\\bin"
        },
        "homeDir": "C:\\Users\\xxx",
        "particleDir": "C:\\Users\\xxx\\.particle",
        "localCompilerToolchainDir": "C:\\Users\\xxx\\.particle\\toolchains"
    },
    "env": {
        "ALLUSERSPROFILE": "C:\\ProgramData",
        "AMD_ENTRYPOINT": "vs/workbench/services/extensions/node/extensionHostProcess",
        "APPDATA": "C:\\Users\\xxx\\AppData\\Roaming",
        "APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true",
        "ChocolateyInstall": "C:\\ProgramData\\chocolatey",
        "ChocolateyLastPathUpdate": "Sun Jan 13 10:49:41 2019",
        "CommonProgramFiles": "C:\\Program Files\\Common Files",
        "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files",
        "CommonProgramW6432": "C:\\Program Files\\Common Files",
        "COMPUTERNAME": "xxx",
        "ComSpec": "C:\\WINDOWS\\system32\\cmd.exe",
        "DriverData": "C:\\Windows\\System32\\Drivers\\DriverData",
        "ELECTRON_RUN_AS_NODE": "1",
        "HOMEDRIVE": "C:",
        "HOMEPATH": "\\Users\\xxx",
        "INTEL_DEV_REDIST": "C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\",
        "LOCALAPPDATA": "C:\\Users\\xxx\\AppData\\Local",
        "LOGONSERVER": "\\\\xxx",
        "MIC_LD_LIBRARY_PATH": "C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\compiler\\lib\\mic",
        "NUMBER_OF_PROCESSORS": "20",
        "OneDrive": "C:\\Users\\xxx\\OneDrive",
        "OneDriveConsumer": "C:\\Users\\xxx\\OneDrive",
        "OPENSSL_CONF": "C:\\OpenSSL-Win32\\bin\\openssl.cfg",
        "OS": "Windows_NT",
        "Path": "C:\\Program Files (x86)\\Razer Chroma SDK\\bin;C:\\Program Files\\Razer Chroma SDK\\bin;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\redist\\ia32\\compiler;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\redist\\intel64\\compiler;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\QuickTime\\QTSystem\\;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files (x86)\\Common Files\\Acronis\\VirtualFile\\;C:\\Program Files (x86)\\Common Files\\Acronis\\VirtualFile64\\;C:\\Program Files (x86)\\Common Files\\Acronis\\FileProtector\\;C:\\Program Files (x86)\\Common Files\\Acronis\\FileProtector64\\;C:\\Program Files (x86)\\Common Files\\Acronis\\SnapAPI\\;C:\\Program Files\\Git\\cmd;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\PuTTY\\;C:\\Users\\xxx\\AppData\\Local\\Programs\\Python\\Python36\\Scripts\\;C:\\Users\\xxx\\AppData\\Local\\Programs\\Python\\Python36\\;C:\\Users\\xxx\\.cargo\\bin;C:\\Users\\xxx\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\Microsoft VS Code\\bin;C:\\Users\\xxx\\AppData\\Roaming\\Python\\Python36\\Scripts;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NGX;%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\System32\\Wbem;%SYSTEMROOT%\\System32\\WindowsPowerShell\\v1.0\\;%SYSTEMROOT%\\System32\\OpenSSH\\;C:\\Users\\xxx\\AppData\\Local\\Programs\\Python\\Python36\\Scripts\\;C:\\Users\\xxx\\AppData\\Local\\Programs\\Python\\Python36\\;C:\\Users\\xxx\\.cargo\\bin;C:\\Users\\xxx\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\Microsoft VS Code\\bin;C:\\Users\\xxx\\AppData\\Roaming\\Python\\Python36\\Scripts;C:\\Users\\xxx\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\xxx\\AppData\\Local\\particle\\bin;C:\\OpenSSL-Win32\\bin",
        "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC",
        "PIPE_LOGGING": "true",
        "PROCESSOR_ARCHITECTURE": "AMD64",
        "PROCESSOR_IDENTIFIER": "Intel64 Family 6 Model 85 Stepping 4, GenuineIntel",
        "PROCESSOR_LEVEL": "6",
        "PROCESSOR_REVISION": "5504",
        "ProgramData": "C:\\ProgramData",
        "ProgramFiles": "C:\\Program Files",
        "ProgramFiles(x86)": "C:\\Program Files (x86)",
        "ProgramW6432": "C:\\Program Files",
        "PSModulePath": "C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules",
        "PUBLIC": "C:\\Users\\Public",
        "SESSIONNAME": "Console",
        "SystemDrive": "C:",
        "SystemRoot": "C:\\WINDOWS",
        "TEMP": "C:\\Users\\xxx\\AppData\\Local\\Temp",
        "TMP": "C:\\Users\\xxx\\AppData\\Local\\Temp",
        "USERDOMAIN": "xxx",
        "USERDOMAIN_ROAMINGPROFILE": "xxx",
        "USERNAME": "xxx",
        "USERPROFILE": "C:\\Users\\xxx",
        "VERBOSE_LOGGING": "true",
        "VS140COMNTOOLS": "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\",
        "VSCODE_CWD": "C:\\Program Files\\Microsoft VS Code",
        "VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
        "VSCODE_IPC_HOOK": "\\\\.\\pipe\\6de69f1b8a4fd1c8c44d9d69d19de1ce-1.32.2-main-sock",
        "VSCODE_IPC_HOOK_EXTHOST": "\\\\.\\pipe\\vscode-ipc-a42fa3e8-37d4-41c7-8936-9d9e31c4261a-sock",
        "VSCODE_LOGS": "C:\\Users\\xxx\\AppData\\Roaming\\Code\\logs\\20190325T144203",
        "VSCODE_LOG_STACK": "false",
        "VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
        "VSCODE_NODE_CACHED_DATA_DIR": "C:\\Users\\xxx\\AppData\\Roaming\\Code\\CachedData\\e64cb27b1a0cbbc3f643c9fc6c7d93d6c6509951",
        "VSCODE_PID": "13064",
        "VSCODE_PREVENT_FOREIGN_INSPECT": "true",
        "windir": "C:\\WINDOWS"
    },
    "versions": {
        "http_parser": "2.8.0",
        "node": "10.2.0",
        "v8": "6.6.346.32",
        "uv": "1.20.3",
        "zlib": "1.2.11",
        "ares": "1.14.0",
        "modules": "64",
        "nghttp2": "1.29.0",
        "napi": "3",
        "openssl": "1.1.0h"
    },
    "vscode": {
        "appName": "Visual Studio Code",
        "appRoot": "c:\\Program Files\\Microsoft VS Code\\resources\\app",
        "machineId": "adb6fa75ac3adab7e1d393e1b049f43fbda8daaef44c94545810cb387ff2d50c",
        "sessionId": "e2b54287-14a8-4202-bbc5-012e1c118ae01553550124785",
        "version": "1.32.2"
    },
    "extensions": [
        {
            "id": "ms-vscode.node-debug",
            "version": "1.32.4"
        },
        {
            "id": "ms-vscode.node-debug2",
            "version": "1.32.0"
        },
        {
            "id": "ms-vscode.references-view",
            "version": "0.0.26"
        },
        {
            "id": "kalitaalexey.vscode-rust",
            "version": "0.4.2"
        },
        {
            "id": "marus25.cortex-debug",
            "version": "0.2.3"
        },
        {
            "id": "ms-python.python",
            "version": "2019.2.5558"
        },
        {
            "id": "ms-vscode.cpptools",
            "version": "0.22.1"
        },
        {
            "id": "particle.particle-vscode-core",
            "version": "1.2.2"
        },
        {
            "id": "particle.particle-vscode-pack",
            "version": "1.2.2"
        },
        {
            "id": "particle.particle-vscode-snippets",
            "version": "1.2.2"
        },
        {
            "id": "particle.particle-vscode-theme",
            "version": "1.2.2"
        }
    ]
}

*** WARNING: MAY CONTAIN CONFIDENTIAL INFORMATION - PLEASE SANITIZE BEFORE SHARING ***
To report an issue, visit:
https://community.particle.io/t/information-how-to-report-bugs-and-provide-feedback/44245

thanks :pray:

this bit:

"firmwareVersion": "1.0.1",
"targetDevice": "Argon",
"targetPlatform": "photon",

seems incorrect as deviceOS@1.0.1 only supports the photon, p1, and electron platforms. if you are indeed targeting an argon, you’ll want to select deviceOS@0.9.0 and the argon platform.

try running the Particle: Configure Workspace for Device command - it’ll guide you toward a valid configuration (docs)

with that in place, try closing and re-opening VSCode, then try to get the full C/C++ extension logs (instructions above).

Thanks.

I changed the environment, but it didn’t solve the intellisense problem.

Fwiw, when I open the file in vscode is pops up this dialog:

Here is the new audit log:

*** WARNING: MAY CONTAIN CONFIDENTIAL INFORMATION - PLEASE SANITIZE BEFORE SHARING ***
To report an issue, visit:
https://community.particle.io/t/information-how-to-report-bugs-and-provide-feedback/44245

{
    "username": "name",
    "workspace": {
        "name": "ArgonTest02",
        "isWorkspace": false,
        "folders": [
            {
                "location": "c:\\Users\\name\\Documents\\Particle\\projects\\ArgonTest02",
                "settings": {
                    "firmwareName": "deviceOS",
                    "firmwareVersion": "0.9.0",
                    "targetDevice": "",
                    "targetPlatform": "argon",
                    "compileButtonAction": "localAppDeviceOS",
                    "flashButtonAction": "localAppDeviceOS",
                    "disableWelcomeScreen": false,
                    "disableLocalCompilerDirtyCheck": false
                },
                "files": [
                    ".vscode",
                    ".vscode\\ipch",
                    ".vscode\\settings.json",
                    "project.properties",
                    "README.md",
                    "src",
                    "src\\ArgonTest02.cpp",
                    "src\\ArgonTest02.ino",
                    "target",
                    "target\\ArgonTest02.bin",
                    "target\\ArgonTest02.bin.crc_block",
                    "target\\ArgonTest02.bin.no_crc",
                    "target\\ArgonTest02.dfu",
                    "target\\ArgonTest02.elf",
                    "target\\ArgonTest02.hex",
                    "target\\ArgonTest02.lst",
                    "target\\ArgonTest02.map",
                    "target\\obj"
                ]
            }
        ]
    },
    "cli": {
        "binpath": "C:\\Users\\name\\.vscode\\extensions\\particle.particle-vscode-core-1.2.2\\src\\cli\\bin\\windows\\amd64\\particle.exe",
        "ok": true,
        "version": "1.40.0",
        "installed": 1553289197570
    },
    "localCompiler": {
        "dependencies": [
            "deviceOS@1.0.1",
            "gcc-arm@5.3.1",
            "buildtools@1.0.1",
            "buildscripts@1.2.0",
            "openocd@0.10.0-particle.1",
            "deviceOS@0.9.0"
        ]
    },
    "platform": {
        "os": "windows",
        "type": "Windows_NT",
        "release": "10.0.17763",
        "arch": "x64",
        "path": {
            "key": "Path",
            "value": "C:\\Program Files (x86)\\Razer Chroma SDK\\bin;C:\\Program Files\\Razer Chroma SDK\\bin;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\redist\\ia32\\compiler;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\redist\\intel64\\compiler;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\QuickTime\\QTSystem\\;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files (x86)\\Common Files\\Acronis\\VirtualFile\\;C:\\Program Files (x86)\\Common Files\\Acronis\\VirtualFile64\\;C:\\Program Files (x86)\\Common Files\\Acronis\\FileProtector\\;C:\\Program Files (x86)\\Common Files\\Acronis\\FileProtector64\\;C:\\Program Files (x86)\\Common Files\\Acronis\\SnapAPI\\;C:\\Program Files\\Git\\cmd;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\PuTTY\\;C:\\Users\\name\\AppData\\Local\\Programs\\Python\\Python36\\Scripts\\;C:\\Users\\name\\AppData\\Local\\Programs\\Python\\Python36\\;C:\\Users\\name\\.cargo\\bin;C:\\Users\\name\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\Microsoft VS Code\\bin;C:\\Users\\name\\AppData\\Roaming\\Python\\Python36\\Scripts;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NGX;%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\System32\\Wbem;%SYSTEMROOT%\\System32\\WindowsPowerShell\\v1.0\\;%SYSTEMROOT%\\System32\\OpenSSH\\;C:\\Users\\name\\AppData\\Local\\Programs\\Python\\Python36\\Scripts\\;C:\\Users\\name\\AppData\\Local\\Programs\\Python\\Python36\\;C:\\Users\\name\\.cargo\\bin;C:\\Users\\name\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\Microsoft VS Code\\bin;C:\\Users\\name\\AppData\\Roaming\\Python\\Python36\\Scripts;C:\\Users\\name\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\name\\AppData\\Local\\particle\\bin;C:\\OpenSSL-Win32\\bin"
        },
        "homeDir": "C:\\Users\\name",
        "particleDir": "C:\\Users\\name\\.particle",
        "localCompilerToolchainDir": "C:\\Users\\name\\.particle\\toolchains"
    },
    "env": {
        "ALLUSERSPROFILE": "C:\\ProgramData",
        "AMD_ENTRYPOINT": "vs/workbench/services/extensions/node/extensionHostProcess",
        "APPDATA": "C:\\Users\\name\\AppData\\Roaming",
        "APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true",
        "ChocolateyInstall": "C:\\ProgramData\\chocolatey",
        "ChocolateyLastPathUpdate": "Sun Jan 13 10:49:41 2019",
        "CommonProgramFiles": "C:\\Program Files\\Common Files",
        "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files",
        "CommonProgramW6432": "C:\\Program Files\\Common Files",
        "COMPUTERNAME": "machine",
        "ComSpec": "C:\\WINDOWS\\system32\\cmd.exe",
        "DriverData": "C:\\Windows\\System32\\Drivers\\DriverData",
        "ELECTRON_RUN_AS_NODE": "1",
        "HOMEDRIVE": "C:",
        "HOMEPATH": "\\Users\\name",
        "INTEL_DEV_REDIST": "C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\",
        "LOCALAPPDATA": "C:\\Users\\name\\AppData\\Local",
        "LOGONSERVER": "\\\\machine",
        "MIC_LD_LIBRARY_PATH": "C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\compiler\\lib\\mic",
        "NUMBER_OF_PROCESSORS": "20",
        "OneDrive": "C:\\Users\\name\\OneDrive",
        "OneDriveConsumer": "C:\\Users\\name\\OneDrive",
        "OPENSSL_CONF": "C:\\OpenSSL-Win32\\bin\\openssl.cfg",
        "OS": "Windows_NT",
        "Path": "C:\\Program Files (x86)\\Razer Chroma SDK\\bin;C:\\Program Files\\Razer Chroma SDK\\bin;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\redist\\ia32\\compiler;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\redist\\intel64\\compiler;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\QuickTime\\QTSystem\\;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files (x86)\\Common Files\\Acronis\\VirtualFile\\;C:\\Program Files (x86)\\Common Files\\Acronis\\VirtualFile64\\;C:\\Program Files (x86)\\Common Files\\Acronis\\FileProtector\\;C:\\Program Files (x86)\\Common Files\\Acronis\\FileProtector64\\;C:\\Program Files (x86)\\Common Files\\Acronis\\SnapAPI\\;C:\\Program Files\\Git\\cmd;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\PuTTY\\;C:\\Users\\name\\AppData\\Local\\Programs\\Python\\Python36\\Scripts\\;C:\\Users\\name\\AppData\\Local\\Programs\\Python\\Python36\\;C:\\Users\\name\\.cargo\\bin;C:\\Users\\name\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\Microsoft VS Code\\bin;C:\\Users\\name\\AppData\\Roaming\\Python\\Python36\\Scripts;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NGX;%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\System32\\Wbem;%SYSTEMROOT%\\System32\\WindowsPowerShell\\v1.0\\;%SYSTEMROOT%\\System32\\OpenSSH\\;C:\\Users\\name\\AppData\\Local\\Programs\\Python\\Python36\\Scripts\\;C:\\Users\\name\\AppData\\Local\\Programs\\Python\\Python36\\;C:\\Users\\name\\.cargo\\bin;C:\\Users\\name\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\Microsoft VS Code\\bin;C:\\Users\\name\\AppData\\Roaming\\Python\\Python36\\Scripts;C:\\Users\\name\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\name\\AppData\\Local\\particle\\bin;C:\\OpenSSL-Win32\\bin",
        "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC",
        "PIPE_LOGGING": "true",
        "PROCESSOR_ARCHITECTURE": "AMD64",
        "PROCESSOR_IDENTIFIER": "Intel64 Family 6 Model 85 Stepping 4, GenuineIntel",
        "PROCESSOR_LEVEL": "6",
        "PROCESSOR_REVISION": "5504",
        "ProgramData": "C:\\ProgramData",
        "ProgramFiles": "C:\\Program Files",
        "ProgramFiles(x86)": "C:\\Program Files (x86)",
        "ProgramW6432": "C:\\Program Files",
        "PSModulePath": "C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules",
        "PUBLIC": "C:\\Users\\Public",
        "SESSIONNAME": "Console",
        "SystemDrive": "C:",
        "SystemRoot": "C:\\WINDOWS",
        "TEMP": "C:\\Users\\name\\AppData\\Local\\Temp",
        "TMP": "C:\\Users\\name\\AppData\\Local\\Temp",
        "USERDOMAIN": "machine",
        "USERDOMAIN_ROAMINGPROFILE": "machine",
        "USERNAME": "name",
        "USERPROFILE": "C:\\Users\\name",
        "VERBOSE_LOGGING": "true",
        "VS140COMNTOOLS": "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\",
        "VSCODE_CWD": "C:\\Program Files\\Microsoft VS Code",
        "VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
        "VSCODE_IPC_HOOK": "\\\\.\\pipe\\6de69f1b8a4fd1c8c44d9d69d19de1ce-1.32.2-main-sock",
        "VSCODE_IPC_HOOK_EXTHOST": "\\\\.\\pipe\\vscode-ipc-f65450d1-11f4-4732-8132-762233fd0a45-sock",
        "VSCODE_LOGS": "C:\\Users\\name\\AppData\\Roaming\\Code\\logs\\20190326T215817",
        "VSCODE_LOG_STACK": "false",
        "VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
        "VSCODE_NODE_CACHED_DATA_DIR": "C:\\Users\\name\\AppData\\Roaming\\Code\\CachedData\\e64cb27b1a0cbbc3f643c9fc6c7d93d6c6509951",
        "VSCODE_PID": "12100",
        "VSCODE_PREVENT_FOREIGN_INSPECT": "true",
        "windir": "C:\\WINDOWS"
    },
    "versions": {
        "http_parser": "2.8.0",
        "node": "10.2.0",
        "v8": "6.6.346.32",
        "uv": "1.20.3",
        "zlib": "1.2.11",
        "ares": "1.14.0",
        "modules": "64",
        "nghttp2": "1.29.0",
        "napi": "3",
        "openssl": "1.1.0h"
    },
    "vscode": {
        "appName": "Visual Studio Code",
        "appRoot": "c:\\Program Files\\Microsoft VS Code\\resources\\app",
        "machineId": "adb6fa75ac3adab7e1d393e1b049f43fbda8daaef44c94545810cb387ff2d50c",
        "sessionId": "f7a2b886-9d2f-48cb-b91a-b22a50446d1a1553662698634",
        "version": "1.32.2"
    },
    "extensions": [
        {
            "id": "ms-vscode.node-debug",
            "version": "1.32.4"
        },
        {
            "id": "ms-vscode.node-debug2",
            "version": "1.32.0"
        },
        {
            "id": "ms-vscode.references-view",
            "version": "0.0.26"
        },
        {
            "id": "kalitaalexey.vscode-rust",
            "version": "0.4.2"
        },
        {
            "id": "marus25.cortex-debug",
            "version": "0.2.3"
        },
        {
            "id": "ms-python.python",
            "version": "2019.3.6139"
        },
        {
            "id": "ms-vscode.cpptools",
            "version": "0.22.1"
        },
        {
            "id": "particle.particle-vscode-core",
            "version": "1.2.2"
        },
        {
            "id": "particle.particle-vscode-pack",
            "version": "1.2.2"
        },
        {
            "id": "particle.particle-vscode-snippets",
            "version": "1.2.2"
        },
        {
            "id": "particle.particle-vscode-theme",
            "version": "1.2.2"
        }
    ]
}

*** WARNING: MAY CONTAIN CONFIDENTIAL INFORMATION - PLEASE SANITIZE BEFORE SHARING ***
To report an issue, visit:
https://community.particle.io/t/information-how-to-report-bugs-and-provide-feedback/44245

:thinking::thinking::thinking::disappointed:

when I open the file in vscode is pops up this dialog

that dialog implies that the C/C++ extension isn't receiving the configuration settings we're providing... which is... not great :grimacing:

kind of grasping at straws here but it'd be interesting to see if you've made any configuration changes. can you share any JSON lines starting w/ C_Cpp within your workspace and user settings?

workspace settings can be found within your project in .\.vscode\settings.json, user settings in C:\Users\<your username>\AppData\Roaming\Code\User\settings.json - or you can do this:

lastly, it'd still be helpful to see the full C/C++ extension logs as described here: