VS Code intellisense not finding kconfig options

Something seems to have broken in my VSC and/or Nordic extensions. Intellisense seems to be working for code, but cannot resolve any of my custom kconfig options.

I use some boolean kconfig CONFIG_WHATEVER along with some #if defined(CONFIG_WHATEVER) to enable/disable code blocks. But everything is greyed out now and intellisense for the code within that block is also disabled. I can right-click the CONFIG_WHATEVER and "view definition" (=1 if enabled), and all code compiles exactly as it should.

Other "standard" options like CONFIG_SERIAL behave fine in the same project.

Can you give any hints where to look or how to fix please?

(AI suggested solution of adding "C_Cpp.default.configurationProvider": "nordic-semiconductor.nrf-connect" to settings.json didn't work)

NCS 3.02

VS Code version:

Version: 1.114.0 (user setup)
Commit: e7fb5e96c0730b9deb70b33781f98e2f35975036
Date: 2026-04-01T09:27:11Z
Electron: 39.8.3
ElectronBuildId: 13658728
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

Parents
  • Hello,

    Any way we can recreate it here?

    Normally I would suggest that you do a pristine build and that you have the specific build active in the APPLICATIONS window in nRF Connect extension in VS code.

    Kenneth

  • Probably not. The really weird thing is I recently made a copy of the entire project folder in order to do some hacking about to troubleshoot a subtle power consumption problem I had, and this copy works OK!

    I have tried cleaning the build configuration and doing a pristine build but that makes no difference. 

    On the "good" copy I can hover over for example CONFIG_MY_CUSTOM_FOO and it looks up the value. On the "bad" copy it doesn't. Yet if I right-click and select "go to definition" on the bad copy it jumps to  \include\generated\zephyr\autoconf.h and shows "1" if configured.

    The contents of the ./vscode folder c_cpp_properties.json and settings.json match between the two.

    I can only guess there is a cached file somewhere making it go wrong?

  • Nick_RA said:
    I can only guess there is a cached file somewhere making it go wrong?

    Looks like it yes, does manually delete the build folder work?

    Kenneth

Reply Children
Related