[ISSUE] Intellisense problem


#1

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.


#2

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.


#3

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


#4

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


#5

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.


#6

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.


#7

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


#8

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:


#9

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.


#10

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.


#11

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.


#12

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


#13

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.


#14

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.