Intellisense doesn't work

Hi,

I know this issue has been addressed in other posts but none of the solutions tested worked for me. I tried the solution of this post : Intellisense stops working when installing new nRF Connect for VS Code extension - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com) 

But instead of doing Pristine build that doesn't work for me (maybe because I have custom firmware with CMake preset?) I removed the build configuration and re-added the build configuration and then Build. Could you confirm this is equivalent to a pristine build ? 

I also tried to add 

"C_Cpp.default.configurationProvider": "nordic-semiconductor.nrf-connect",
to my settings.json. I tried to uninstall/reinstall nRF Connect extension pack (along with closing/opening vscode). None of this work on the long run.
Sometimes, I make it work I don't know how, and then, it breaks, I don't know why. I uninstalled C/C++ Extension pack that I believed was causing conflict but the issue remain.
is there any other extension that could cause conflict? 
 
Is there an "always work" solution? I can re-do what I already did if needed and if step by step instructions are given. 
Thank you for your help
EDIT : I tried a from scratch installation : uninstall most of the extensions (except python and non related C/C++, make, gnu, nrf, mcu etc...), uninstall vscode, restart computer, install vscode, install nRF Connect extension pack ONLY. It doesn't work. But I noticed that it is specific to a projects. With some projects, it works, and other, it doesn't. One of the non working project is a folder where I import samples only : 
On my custom project, I just realized that removing build configuration of a working project breaks Intellisense, even if I re-add the build configuration and I build the project (that builds successfully). Why?
  • Hi Ben_Squar3d,

    Have you tried to, in the nRF Connect sidebar, Application panel, click on the image whose source code you are editing?

    The nRF Connect extension takes the build/compile_commands.json file and parses it to create the configuration for IntelliSense. The file is only available after a build configuration is generated.

    On top of that, because the environment supports browsing code for multiple build configurations and images at once, you need to click on the image you are working with to "trigger" the change in IntelliSense configurations.

    Hieu

  • That's it! I was so unaware of that fact! It was so simple I didn't thought of it. Thing is, We don't need to click on the image to be able to build/flash it so sometimes it happened I had my image clicked, and sometimes not... thank you very much!

Related