[ISSUE] Intellisense problem

Supporting information

  • VSCode Version: 1.28
  • OS Version: Windows 10
  • Other extensions installed:
    Arduino (disabled), Cortex-Debug, Python (disabled), Serial Monitor (disabled)

Steps to Reproduce:

  1. open Workspace (containing a Particle project – a simple Blink An LED app)
  2. there is no number 2 ;^)

In the PROBLEMS log, I get
#include errors detected. Please update your includePath. IntelliSense features for this translation unit (C:\Users\blave\OneDrive\Documents\Particle\projects\WorkbenchProjects\BlinkAnLED\src\BlinkAnLED.ino) will be provided by the Tag Parser.

and
cannot open source file “nuttx/config.h” (dependency of “C:\Users\blave.particle\toolchains\deviceOS\0.7.0\firmware-0.7.0\user\inc\Particle.h”)

Launch with code --disable-extensions to check.
Does this issue occur when all extensions are disabled?: Yes

I see that at least one other person has this issue, as described in the “multiple threads” post.

1 Like

I too get similar intelisense messages. I’ve tested with the simple led flasher shown below. Local compilation completes ok. The code downloads and runs as expected.

/*

  • Project t2 <- Intelisense underlines this line with green ~~~~~. Hover over gives the message below. It’s odd as it is within a comment at the start of the file .
  • Description:
  • Author:
  • Date:
    */

uint8_t fred = 0;

// setup() runs once, when the device is first turned on.
void setup() {
// Put initialization like pinMode and begin functions here.
pinMode(D7, OUTPUT);
}

// loop() runs over and over again, as quickly as it can execute.
void loop() {
// The core of your code will likely live here.
digitalWrite(D7, fred & 0x80);
fred++;
}

I have noted that the message varies with deviceOS version as shown below!

#include errors detected. Please update your includePath. IntelliSense features for this translation unit (C:\xxx\t2\src\t2.ino) will be provided by the Tag Parser.
cannot open source file “stdint.h” (dependency of “C:\Users\xxx.particle\toolchains\deviceOS\0.6.3\firmware-0.6.3\user\inc\Particle.h”)

#include errors detected. Please update your includePath. IntelliSense features for this translation unit (C:\xxx\t2\src\t2.ino) will be provided by the Tag Parser.
cannot open source file “nuttx/config.h” (dependency of “C:\Users\xxx.particle\toolchains\deviceOS\0.7.0\firmware-0.7.0\user\inc\Particle.h”)

Windows 10
Visual Studio Code
Version: 1.28.0 (user setup)
Commit: 431ef9da3cf88a7e164f9d33bf62695e07c6c2a9
Date: 2018-10-05T14:58:53.203Z
Electron: 2.0.9
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

C/C++ IntelliSense, debugging, and code browsing. 0.19.0
Cortex Debug 0.1.21

Code snippets for Particle Workbench
Matter and Dark Matter; dark and light themes by Particle.
Particle Workbench (all 3 are 1.0.0-alpha.3)

I hope that this helps the developer shed some light on the problem.

By the way, the feature to change deviceOS version and have the the new local toolchain automatically load up and just work is excellent. Well done. Looking forward to the beta.

If it is a case of “update your includePath”, could someone please suggest what path and where to add it.
Thanks

Besides the output, are there functional errors? Can you peek to definition? What about compiling?

Compilation completes without error although slow (~ 1 min). The code flashes the LED as expected.
Peek to definition of pinMode displays the definition in wifitester.cpp. However the problem window for wifitester.cpp now has the same can not open file message as my LED flasher t2.ino

#include errors detected. Please update your includePath. IntelliSense features for this translation unit (C:\Users\xxx.particle\toolchains\deviceOS\0.7.0\firmware-0.7.0\system\src\wifitester.cpp) will be provided by the Tag Parser.

{
“resource”: “/c:/Users/xxx/.particle/toolchains/deviceOS/0.7.0/firmware-0.7.0/system/src/wifitester.cpp”,
“owner”: “generated_diagnostic_collection_name#0”,
“code”: null,
“severity”: 2,
“message”: “cannot open source file “nuttx/config.h” (dependency of “C:\Users\xxx\.particle\toolchains\deviceOS\0.7.0\firmware-0.7.0\user\inc\Particle.h”)”,
“startLineNumber”: 2,
“startColumn”: 1,
“endLineNumber”: 2,
“endColumn”: 80
}

I hope this helps.

I have same problem, still persistent after explicitly setting the target platform to “electron” and firmware version to “0.7.0”.

Reproduce: From clean install of VS Code and alpha4 extensions, and a computer restart.

First a pop saying IntelliSense not correctly configured.
image

Then two errors (against the empty .ino template, with only setup{} and loop{} and no other content:

#include errors detected. Please update your includePath. IntelliSense features for this translation unit (C:\Users\kendali\Documents\Particle\my-app\src\my-app.ino) will be provided by the Tag Parser.
and
cannot open source file “nuttx/config.h” (dependency of “C:\Users\kendali.particle\toolchains\deviceOS\0.7.0\firmware-0.7.0\user\inc\Particle.h”)

Seems that the issue might be related to a path dependency?

Other side effect is IntelliSense only partially works, ie typing “Particle” only brings up Particle.connect, Particle.connected, Particle.process and Particle.publish as options, there should be plenty more.

2 Likes

I’m having the same issue! Have any luck figuring this out?

hey all :wave: - just wanted chime in quick here and say: we’re aware of the weirdness w/ intellisense (especially on windows). we’ll be including some fixes in the next alpha drop that should make things better overall. sorry for the bumps! thanks for trying the preview :pray:

2 Likes

Tried playing with include paths a bit, but couldn’t solve it.
One other point of info which might help - I installed VS Code using my administrator account - on Windows 7 corporate machine (using the correct install file VSCodeSetup-x64-1.28.2), but use it with my “normal” restricted account under a different username. Maybe nothing, but worth sharing.

1 Like

Hi - any view as to when we see next drop of alpha workbench? - really can’t use it at all until get past this hurdle.

Um, it is alpha at this point. Trust me, this will get better, but I would not recommend trying to use the Workbench alpha for anything critical. That’s why it’s called a Developer Preview :grinning:.

I’m not trying or wanting to sound snarky there, but we wanted to get the alpha out into the wild precisely so that these issues could be uncovered.

I think @ikendall was actually hoping for a next iteration of alpha progress (e.g. bug fixes, new feature, improvement, mesh support, ...), not necessarily expecting to proceed to beta or even RC, when he said that

Don’t worry - not intending to do anything serious with it just yet, but just really keen to evaluate more - which I can’t do until I get past this one. I appreciate the approach of getting it out there ASAP.

Thanks for the response.

ScruffR, you are absolutely right. :roll_eyes:

An “alpha 5” release is being tested internally right now. Hopefully it will be out in the next few days.

2 Likes

SO, now on Alpha 6, and still having problems with this … here is the latest error notification …
image

And here is critical data of my config (redacted) …

{
    "username": "ian.kendall@vw.com",
    "workspace": {
        "name": "Tinker (Workspace)",
        "isWorkspace": true,
        "configFile": "Tinker.code-workspace",
        "root": "c:\\Users\\kendali\\Documents\\Particle_Workbench\\myWorkspace\\Tinker",
        "files": [
            ".vscode",
            ".vscode\\launch.json",
            ".vscode\\settings.json",
            "project.properties",
            "README.md",
            "src",
            "src\\Tinker.ino",
            "Tinker.code-workspace"
        ]
    },
    "vscode": {
        "appName": "Visual Studio Code",
        "appRoot": "c:\\Users\\kendali\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
        "machineId": "11b5eb64-cc88-4fdf-b60c-5a00b0dbb3b1",
        "sessionId": "6afa7778-387b-4a33-8535-2455334df0a11546991065594",
        "version": "1.30.2"
    },
    "cli": {
        "binpath": "C:\\Users\\kendali\\.vscode\\extensions\\particle.particle-vscode-core-1.0.0-alpha.6\\src\\cli\\bin\\windows\\amd64\\particle.exe",
        "ok": true,
        "version": "1.36.3"
    },
    "localCompiler": {
        "dependencies": [
            "deviceOS@0.8.0-rc.10",
            "gcc-arm@5.3.1",
            "buildtools@1.0.1",
            "buildscripts@1.0.0",
            "deviceOS@0.7.0"
        ]
    },
    "platform": {
        "os": "windows",
        "type": "Windows_NT",
        "release": "6.1.7601",
        "arch": "x64",
        "path": {
            "key": "Path",
            "value": "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files\\Python36\\Scripts\\;C:\\Program Files\\Python36\\;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Program Files\\Common Files\\Microsoft Shared\\Windows Live;C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\Windows Live;C:\\Ora10g\\bin;C:\\windows\\system32;C:\\windows;C:\\windows\\System32\\Wbem;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Program Files (x86)\\Windows Live\\Shared;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\dfu-util;C:\\Program Files (x86)\\Common Files\\EMC\\;C:\\Program Files\\PuTTY\\;C:\\Users\\naus-ad-kendali\\AppData\\Local\\Android\\Sdk\\platform-tools;C:\\Program Files (x86)\\STMicroelectronics\\STM32 ST-LINK Utility\\ST-LINK Utility;C:\\Program Files\\nodejs\\;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\Git\\cmd;C:\\Users\\kendali\\Documents\\Andoid_developer\\Android\\sdk\\tools;c:\\Users\\kendali\\Documents\\Andoid_developer\\Android\\sdk\\platform-tools\\;C:\\Users\\kendali\\AppData\\Roaming\\npm;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Users\\kendali\\AppData\\Local\\particle\\bin;C:\\Program Files\\nodejs\\node_modules\\npm\\bin; C:\\Users\\naus-ad-kendali\\AppData\\Local\\particle\\bin;C:\\cygwin64\\bin;C:\\Program Files\\Amazon\\AWSCLI;C:\\Users\\kendali\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\kendali\\AppData\\Local\\Box\\Box Edit\\"
        },
        "homeDir": "C:\\Users\\kendali",
        "particleDir": "C:\\Users\\kendali\\.particle",
        "localCompilerToolchainDir": "C:\\Users\\kendali\\.particle\\toolchains"
    },
    "env": {
        "AMD_ENTRYPOINT": "vs/workbench/node/extensionHostProcess",
        "APPDATA": "C:\\Users\\kendali\\AppData\\Roaming",
        "ELECTRON_RUN_AS_NODE": "1",
        "LOCALAPPDATA": "C:\\Users\\kendali\\AppData\\Local",
        "NUMBER_OF_PROCESSORS": "4",
        "OPENSSL_CONF": "C:\\OpenSSL-Win32\\bin\\openssl.cfg",
        "OS": "Windows_NT",
        "Path": "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files\\Python36\\Scripts\\;C:\\Program Files\\Python36\\;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Program Files\\Common Files\\Microsoft Shared\\Windows Live;C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\Windows Live;C:\\Ora10g\\bin;C:\\windows\\system32;C:\\windows;C:\\windows\\System32\\Wbem;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Program Files (x86)\\Windows Live\\Shared;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\dfu-util;C:\\Program Files (x86)\\Common Files\\EMC\\;C:\\Program Files\\PuTTY\\;C:\\Users\\naus-ad-kendali\\AppData\\Local\\Android\\Sdk\\platform-tools;C:\\Program Files (x86)\\STMicroelectronics\\STM32 ST-LINK Utility\\ST-LINK Utility;C:\\Program Files\\nodejs\\;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\Git\\cmd;C:\\Users\\kendali\\Documents\\Andoid_developer\\Android\\sdk\\tools;c:\\Users\\kendali\\Documents\\Andoid_developer\\Android\\sdk\\platform-tools\\;C:\\Users\\kendali\\AppData\\Roaming\\npm;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Users\\kendali\\AppData\\Local\\particle\\bin;C:\\Program Files\\nodejs\\node_modules\\npm\\bin; C:\\Users\\naus-ad-kendali\\AppData\\Local\\particle\\bin;C:\\cygwin64\\bin;C:\\Program Files\\Amazon\\AWSCLI;C:\\Users\\kendali\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\kendali\\AppData\\Local\\Box\\Box Edit\\",
        "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW",
        "PIPE_LOGGING": "true",
        "PROCESSOR_ARCHITECTURE": "AMD64",
        "PROCESSOR_IDENTIFIER": "Intel64 Family 6 Model 61 Stepping 4, GenuineIntel",
        "PROCESSOR_LEVEL": "6",
        "PROCESSOR_REVISION": "3d04",
        "ProgramData": "C:\\ProgramData",
        "ProgramFiles": "C:\\Program Files",
        "ProgramFiles(x86)": "C:\\Program Files (x86)",
        "PSModulePath": "C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\",
        "PUBLIC": "C:\\Users\\Public",
        "SESSIONNAME": "Console",
        "SystemDrive": "C:",
        "SystemRoot": "C:\\windows",
        "TEMP": "C:\\Users\\kendali\\AppData\\Local\\Temp",
        "TMP": "C:\\Users\\kendali\\AppData\\Local\\Temp",
        "VERBOSE_LOGGING": "true",
        "VSCODE_CWD": "C:\\Users\\kendali\\AppData\\Local\\Programs\\Microsoft VS Code",
        "VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
        "VSCODE_IPC_HOOK": "\\\\.\\pipe\\c4c450440e95b1a47e62f3e4231cb749-1.30.2-main-sock",
        "VSCODE_IPC_HOOK_EXTHOST": "\\\\.\\pipe\\vscode-ipc-021893b2-db1a-4a6a-bd36-0c988e0c4299-sock",
        "VSCODE_LOGS": "C:\\Users\\kendali\\AppData\\Roaming\\Code\\logs\\20190108T153857",
        "VSCODE_LOG_LEVEL": "undefined",
        "VSCODE_LOG_STACK": "false",
        "VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
        "VSCODE_NODE_CACHED_DATA_DIR": "C:\\Users\\kendali\\AppData\\Roaming\\Code\\CachedData\\61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8",
        "VSCODE_PID": "225648",
        "VSCODE_PREVENT_FOREIGN_INSPECT": "true",
        "VSEDEFLOGDIR": "C:\\ProgramData\\McAfee\\DesktopProtection",
        "windir": "C:\\windows",
        "windows_tracing_flags": "3",
        "windows_tracing_logfile": "C:\\BVTBin\\Tests\\installpackage\\csilogfile.log"
    },
    "versions": {
        "http_parser": "2.7.0",
        "node": "8.9.3",
        "v8": "6.1.534.41",
        "uv": "1.15.0",
        "zlib": "1.2.11",
        "ares": "1.10.1-DEV",
        "modules": "57",
        "nghttp2": "1.25.0",
        "openssl": "1.0.2n"
    },
    "extensions": [
        {
            "id": "ms-vscode.node-debug",
            "version": "1.30.4"
        },
        {
            "id": "ms-vscode.node-debug2",
            "version": "1.30.3"
        },
        {
            "id": "ms-vscode.references-view",
            "version": "0.0.18"
        },
        {
            "id": "marus25.cortex-debug",
            "version": "0.1.21"
        },
        {
            "id": "ms-vscode.cpptools",
            "version": "0.20.1"
        },
        {
            "id": "particle.particle-vscode-core",
            "version": "1.0.0-alpha.6"
        },
        {
            "id": "particle.particle-vscode-snippets",
            "version": "1.0.0-alpha.6"
        },
        {
            "id": "particle.particle-vscode-theme",
            "version": "1.0.0-alpha.6"
        }
    ]
}

I was able to remove the VS code warning referencing missing particle include files by adding the following paths to my c_cpp_properties.json file.

                "~/.particle/toolchains/deviceOS/0.9.0/firmware-0.9.0/**",
                "~/.particle/toolchains/gcc-arm/5.3.1/arm-none-eabi/include/c++/5.3.1/arm-none-eabi/armv6-m/**"
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**",                
                "~/.particle/toolchains/deviceOS/0.9.0/firmware-0.9.0/**",
                "~/.particle/toolchains/gcc-arm/5.3.1/arm-none-eabi/include/c++/5.3.1/arm-none-eabi/armv6-m/**"
           ],

I did a default install and I’m using firmware 0.9.0. There are other firmware versions under deviceOS, if you happen to be using a different version.
I pulled the arm directory that I used from the gcc compiler being used when during a build.

please see:

as well as: