Intellisense can't find references, even in same file! Hover seems to work fine. VS Code, Arduino, SamD21 #1449
Description
I am having an odd problem getting Intellisense to "Find all references", "Go to definition", and "Go to references" within my workspace. It will never find references anywhere. "Go to definition" only works when the definition is in the same .ino file; if the definition is in any other file or library, it will go to the declaration in the appropriate header file. When I hover, I get valid "quick info", and when I start typing something, a valid completion list pops up, so intellisense is mostly working.
Now for the really odd part: I have recently moved from the Arduino IDE to VS Code using the Arduino Extension. When I did this, I got all the Intellisense features to work, even References. I then got my SEGGER debugger to work (a painfully trial-and-error process). When I tried References again, I found I had somehow broken it with the symptoms I described above.
Not wanting to mess up my debugger, I tried again to go through the whole process with my laptop (a similar machine to my desktop). In fairly short order, I got the laptop to work perfectly: Intellisense and debugger even References.
I then uninstalled VS Code on my desktop to start over from scratch, and I encountered the same References problems. As far as I can tell, both machines are set up the same. I even tried swapping c_cpp_properties.json files which made no difference.
My workspace is on a network drive, accessible from both machines as Y: drive. The single set of .json files are shared from this drive, but I experimented with directing both machines to different workspace foldere on that drive, and it made no difference.
Arduino 1.8.19
Board driver: SparkFun SAMD21 breakout dev card 1.8.6 (dependency: Arduino SAMD Boards 1.8.1)
Board driver: Arduino SAMD Boards 1.8.12
VS Code 1.64.0 Extensions:
Arduino microsoft version
Intellisense
C/C++
C/C++ Extension pack (9 Extensions)
Better C++ syntax
Remote Extensions (4)
Please help. I bet it is something simple.
Doug