I am using nRF Connect for VS Code V2024.7.13 and the intellisense does not work.
I am using nRF Connect for VS Code V2024.7.13 and the intellisense does not work.
Hi,
Does it work for any other files?
Regards,
Sigurd Hellesvik
No it does not work for any files. I have read that the intellisense is linked to the compile_commands.json however I can not find this file in my project after building.
As fast as things change at Nordic/Zephyr it might be that the compile_commands.json is no longer used or available.
Do you use sysbuild?
No but I assume if I click the button it will? What is the difference between default and sysbuild?
trampas said:What is the difference between default and sysbuild?
It is pretty much a rework of our build system for multi-image builds (such as using MCUboot).
https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/build/sysbuild/index.html
Try to build both with and without and see if it impacts the issue.
Also: Which version of the SDK do you use?
Note when switching to sysbuild it does not build the mcuboot.
Note when switching to sysbuild it does not build the mcuboot.
Yes, right. Sysbuild has another way of enabling MCUboot.
But let's not use Sysbuild now then. I found out that you for sure do not use it, which was my goal.
For the selection of the mcuboot folder:
Here is how it looks for me:
You see that the icon for the selected folder becomes blue, to indicate that it is selected.
For intellisense in general:
Sometimes restarting VS Code and removing .vscode workspace folders (if you do not specifically use them) can fix stuff.
Yes it turns blue:
I have tried checking out project in a new directory and restarting VSCode and Windows OS multiple times.
I would like to understand how nRF Connect does the intellisense, is it parsing the compile_commands.json or doing something else?
The basic idea is that I can try all sorts of methods to resolve the problem, but as Harrington Emerson said "The man who grasps principles can successfully select his own methods. The man who tries methods, ignoring principles, is sure to have trouble."
Right now I feel like I am trying random methods and would prefer getting information needed to root cause the issue.
I want to learn the principles behind intellisense more than I want the issue fixed.
That is fair enough.
I will ask our VS Code team if they got an explanation for intellisense and our extension.
Here is what they say:
"Yes, the extension generally uses compile_commands.json. If that's not available it uses reasonable fallbacks. As mentioned above, the C/C++ extension has a command: Log Diagnostics, which dumps the provided configuration of the active file, so the user can check whether something is not as expected."
Is this helpful?