Intellisense not workingsz

I am using nRF Connect for VS Code V2024.7.13 and the intellisense does not work. 

Parents
  • 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. 

  • 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?

  • I could not find a "Log Diagnostics" in the C/C++ extension, nor mentions of it above.  

  • I found this logging setting and enabled it to be information: 

    Then I got this message

    loggingLevel has changed to: Information
      tag parsing file: D:\Projects\Remington\reach-handpiece-bootloader-wksp\handpiece-fw\reach_hp\build\zephyr\include\generated\devicetree_generated.h
        tag parsing error (this can be ignored unless symbols can't be found):
        line 12970 (col. 33): error: incorrectly formed universal character name
    Shutting down IntelliSense server: D:\Projects\Remington\reach-handpiece-bootloader-wksp\zephyr\include\zephyr\sys\util_listify.h
    Shutting down IntelliSense server: D:\Projects\Remington\reach-handpiece-bootloader-wksp\zephyr\include\zephyr\sys\util_loops.h
    Shutting down IntelliSense server: D:\Projects\Remington\reach-handpiece-bootloader-wksp\zephyr\include\zephyr\sys\util_internal_util_inc.h
    Shutting down IntelliSense server: D:\Projects\Remington\reach-handpiece-bootloader-wksp\zephyr\include\zephyr\sys\util_internal_is_eq.h
    Error squiggles will be disabled in: file:///d%3A/Projects/Remington/reach-handpiece-bootloader-wksp/zephyr/include/zephyr/dt-bindings/dt-util.h
    Error squiggles will be disabled in: file:///d%3A/Projects/Remington/reach-handpiece-bootloader-wksp/zephyr/include/zephyr/dt-bindings/adc/nrf-adc.h
    Error squiggles will be disabled in: file:///d%3A/Projects/Remington/reach-handpiece-bootloader-wksp/zephyr/include/zephyr/sys/util_macro.h
    Shutting down IntelliSense server: D:\Projects\Remington\reach-handpiece-bootloader-wksp\handpiece-fw\reach_hp\src\modules\analog.c
      tag parsing file: D:\Projects\Remington\reach-handpiece-bootloader-wksp\handpiece-fw\reach_hp\build\mcuboot\zephyr\include\generated\devicetree_generated.h
        tag parsing error (this can be ignored unless symbols can't be found):
        line 13327 (col. 33): error: incorrectly formed universal character name
    

    Both of devicetree parsing errors appear to be in the same comment block. 

Reply
  • I found this logging setting and enabled it to be information: 

    Then I got this message

    loggingLevel has changed to: Information
      tag parsing file: D:\Projects\Remington\reach-handpiece-bootloader-wksp\handpiece-fw\reach_hp\build\zephyr\include\generated\devicetree_generated.h
        tag parsing error (this can be ignored unless symbols can't be found):
        line 12970 (col. 33): error: incorrectly formed universal character name
    Shutting down IntelliSense server: D:\Projects\Remington\reach-handpiece-bootloader-wksp\zephyr\include\zephyr\sys\util_listify.h
    Shutting down IntelliSense server: D:\Projects\Remington\reach-handpiece-bootloader-wksp\zephyr\include\zephyr\sys\util_loops.h
    Shutting down IntelliSense server: D:\Projects\Remington\reach-handpiece-bootloader-wksp\zephyr\include\zephyr\sys\util_internal_util_inc.h
    Shutting down IntelliSense server: D:\Projects\Remington\reach-handpiece-bootloader-wksp\zephyr\include\zephyr\sys\util_internal_is_eq.h
    Error squiggles will be disabled in: file:///d%3A/Projects/Remington/reach-handpiece-bootloader-wksp/zephyr/include/zephyr/dt-bindings/dt-util.h
    Error squiggles will be disabled in: file:///d%3A/Projects/Remington/reach-handpiece-bootloader-wksp/zephyr/include/zephyr/dt-bindings/adc/nrf-adc.h
    Error squiggles will be disabled in: file:///d%3A/Projects/Remington/reach-handpiece-bootloader-wksp/zephyr/include/zephyr/sys/util_macro.h
    Shutting down IntelliSense server: D:\Projects\Remington\reach-handpiece-bootloader-wksp\handpiece-fw\reach_hp\src\modules\analog.c
      tag parsing file: D:\Projects\Remington\reach-handpiece-bootloader-wksp\handpiece-fw\reach_hp\build\mcuboot\zephyr\include\generated\devicetree_generated.h
        tag parsing error (this can be ignored unless symbols can't be found):
        line 13327 (col. 33): error: incorrectly formed universal character name
    

    Both of devicetree parsing errors appear to be in the same comment block. 

Children
Related