nRF Connect for VS Code - Code analysis does not work anymore

Hi,

a couple of days ago, I had to install some STM plugins for VS Code (I'm sorry Sob).

In the process, the "CMake Tools" from Microsoft were also installed. I remember seeing some message that reported a conflict between plugins (if I remember related to code analysis or Intellisense or so).

I've dieabled the new plugins, but I do not get context-sensitive information in the nRF Connect for VS Code plugin anymore. In other words: When I edit my code, and perform a right-click, functions like "Go to declaration" or "Find all references" etc. does not work anymore. I cannot jump to the definitions of my variables anymore.

How can I enable dynamic code analysis for nRF Connect for VS Code again? I could not find any disabled Nordic plugins...

Best regards,
Michael

  • Hi Michael,


    Could you try to Ctrl+Shift+P and select "Developer : Show Running Extensions " and see if you have only C/C++ running and nothing of STM?

    If so, you could try Ctrl+Shift+P and select "C/C++ : Reset IntelliSense Database".

    Please try this and let me know how it goes.

    Regards,

    Priyanka

  • Hi Priyanka,

    nothing from STM running, C/C++ from Microsoft is running. Although, I do not have the option to reset the Intellisense database, it is missing from the list...

    I tried disabling and enabling C/C++, but nothing changed.

    I also tried disabling the CMake plugin from twxs (CMake Tools was already disabled), which did not help. (But I think CMake was installed before already, maybe even a dependency to the NCS Plugin?)

    According to "Show Running Extenions", I also noticed the plugins "NPM support for VS Code" and "Emmet", which are not listed in the installed plugin section (left screen side "Extensions" icon), if this is important.

    It seems like the C/C++ plugin has some of its functionalities blocked...

    Best regards,
    Michael

  • I think I found the problem:

    Go to the Extensions view, select C/C++ and on the gear symbol ('Manage') next to the Auto-Update checkbox, select "Settings". Then, select "IntelliSense" and scroll down almost to the bottom to the "Intelli Sense Engine" setting. In my case, it was disabled. I set it back to "default" and now the code analysis is running again.

    It is a bit annoying that this important setting is hidden so deep in the configuration, and it is annoying that it is not reset to default even if I remove the C/C++ extension and re-install it again. And it makes me sad that extensions from different conpanies might side-stab the settings of another company because there are compatibility issues with extensions.

    But enough with the complaints. Maybe my findings can help other developers that are expected to work with both Nordic and STM hardware to re-enable their code analysis under C/C++ Nerd

    Best regards,
    Michael

Related