VSCode new project intellisense errors

I am using the nrfConnect plugin for vscode, I used it to install the SDK and create a new project. I am using the Bluetooth Mesh Light (srv) as a template.

The build is successful and the device flashes fine all through the VSCode interface, but the intellisense is broken and I can't see the dependent files (see image below).
Error states: cannot open source file "bluetooth/mesh/models.h"C/C++(1696)


Any ideas why? Thanks for any guidance!

  • Hi,

    Are you able to open the files with Ctrl + left click or F12?

    Please provide support information from the VS Code extension:

    1. Open the command palette (Ctrl + Shift + P or View > Command Palette).
    2. Write "nRF Connect: Generate support information" and press enter.
    3. Copy the entire support information output.
    4. Upload it here using Insert > Code or upload a .txt file with Insert > Image/video/file.

    Make sure to remove confidential information you do not want to be shared in a public case.

    Best regards,
    Marte

  • Great I didn't know that this tool existed, here is the attached file. A

    {
      "platform": {
        "os": "darwin",
        "osVersion": "Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000",
        "osKernel": "23.0.0",
        "vscode": "1.85.1",
        "electron": "25.9.7",
        "node": "v18.15.0"
      },
      "system": {
        "date": "2024-01-15T19:55:55.192Z",
        "vscodeRoot": "/Applications/Visual Studio Code.app/Contents/Resources/app",
        "nrfConnectForDesktopInstalled": true,
        "vscodeUptime": "00:00:15",
        "osUptime": "66:32:09",
        "cpu": "Apple M1 Pro"
      },
      "workspace": {
        "name": "Untitled (Workspace)",
        "workspaceFile": "1705299405289",
        "folders": [
          "/Users/joe/repos/nrf-light-example"
        ]
      },
      "sdks": [
        {
          "version": "v2.5.1",
          "path": "/opt/nordic/ncs/v2.5.1"
        }
      ],
      "activeBuild": "/Users/joe/repos/nrf-light-example/build",
      "apps": [
        {
          "workspace": "/Users/joe/repos/nrf-light-example",
          "uri": "/Users/joe/repos/nrf-light-example",
          "buildConfigurations": [
            {
              "id": "/Users/joe/repos/nrf-light-example/build",
              "name": "build",
              "boardId": "nrf52840dk_nrf52840",
              "type": "Zephyr",
              "isChild": false,
              "isStale": false,
              "taskBindings": {
                "build": [],
                "pristineBuild": [],
                "flash": [],
                "eraseAndFlash": []
              }
            }
          ]
        }
      ],
      "topdir": "/opt/nordic/ncs/v2.5.1",
      "workspaceState": "freestanding-ready",
      "toolchains": [
        {
          "version": "2.5.1",
          "path": "/opt/nordic/ncs/toolchains/20d68df7e5"
        }
      ],
      "connectedDevices": [
        {
          "serialNumber": "001050285840"
        }
      ],
      "deviceProvider": "nrfutil",
      "tools": {
        "/opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc": "0.16.1",
        "/Applications/SEGGER/JLink/JLinkExe": "7.88j",
        "/usr/local/bin/nrfjprog": "10.23.4",
        "nrfutil": "Not found",
        "/opt/nordic/ncs/toolchains/20d68df7e5/bin/cmake": "3.20.5",
        "/opt/nordic/ncs/toolchains/20d68df7e5/bin/west": "1.1.0",
        "/opt/nordic/ncs/toolchains/20d68df7e5/bin/python3": "3.9.6",
        "/opt/nordic/ncs/toolchains/20d68df7e5/bin/ninja": "1.10.2",
        "/opt/nordic/ncs/toolchains/20d68df7e5/bin/gperf": "3.1",
        "/opt/nordic/ncs/toolchains/20d68df7e5/bin/dtc": "1.6.1",
        "/opt/nordic/ncs/toolchains/20d68df7e5/bin/gn": "2122",
        "/opt/nordic/ncs/toolchains/20d68df7e5/bin/git": "2.37.3",
        "gdbPath": "/opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb"
      },
      "nrfutil": {
        "nrfutil-device": {
          "version": "2.0.0",
          "binPath": "/Users/joe/.vscode/extensions/nordic-semiconductor.nrf-connect-2023.11.301-darwin-arm64/platform/nrfutil/bin/nrfutil-device"
        },
        "nrfutil-toolchain-manager": {
          "version": "0.14.1",
          "binPath": "/Users/joe/.vscode/extensions/nordic-semiconductor.nrf-connect-2023.11.301-darwin-arm64/platform/nrfutil/bin/nrfutil-toolchain-manager"
        }
      },
      "environment": {
        "westEnv": {
          "ELECTRON_RUN_AS_NODE": "1",
          "GIT_EXEC_PATH": "/opt/nordic/ncs/toolchains/20d68df7e5/Cellar/git/2.37.3/libexec/git-core",
          "HOME": "/Users/joe",
          "PATH": "/opt/nordic/ncs/toolchains/20d68df7e5/bin:/opt/nordic/ncs/toolchains/20d68df7e5/usr/bin:/opt/nordic/ncs/toolchains/20d68df7e5/usr/local/bin:/opt/nordic/ncs/toolchains/20d68df7e5/opt/bin:/opt/nordic/ncs/toolchains/20d68df7e5/opt/nanopb/generator-bin:/opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk/aarch64-zephyr-elf/bin:/opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk/x86_64-zephyr-elf/bin:/opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk/arm-zephyr-eabi/bin:/Users/joe/Library/Python/3.11/bin/:/Users/joe/.bun/bin:/Users/joe/google-cloud-sdk/bin:/opt/homebrew/opt/openssl@3/bin:/Applications/Sublime Text.app/Contents/SharedSupport/bin:/Users/joe/.nvm/versions/node/v18.12.1/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Library/TeX/texbin:/Applications/VMware Fusion.app/Contents/Public:/Users/joe/.cargo/bin:/opt/homebrew/opt/fzf/bin:/Users/joe/Library/Python/3.11/bin/:/Users/joe/.bun/bin:/Users/joe/google-cloud-sdk/bin:/opt/homebrew/opt/openssl@3/bin:/Applications/Sublime Text.app/Contents/SharedSupport/bin:/Users/joe/.nvm/versions/node/v18.12.1/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Library/TeX/texbin:/Applications/VMware Fusion.app/Contents/Public:/Users/joe/.cargo/bin:/opt/homebrew/opt/fzf/bin",
          "ZEPHYR_BASE": "/opt/nordic/ncs/v2.5.1/zephyr",
          "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
          "ZEPHYR_SDK_INSTALL_DIR": "/opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk",
          "USER": "joe"
        },
        "inherited": {
          "ELECTRON_RUN_AS_NODE": "1",
          "HOME": "/Users/joe",
          "PATH": "/Users/joe/Library/Python/3.11/bin/:/Users/joe/.bun/bin:/Users/joe/google-cloud-sdk/bin:/opt/homebrew/opt/openssl@3/bin:/Applications/Sublime Text.app/Contents/SharedSupport/bin:/Users/joe/.nvm/versions/node/v18.12.1/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Library/TeX/texbin:/Applications/VMware Fusion.app/Contents/Public:/Users/joe/.cargo/bin:/opt/homebrew/opt/fzf/bin",
          "USER": "joe"
        },
        "toolchainPath": "/opt/nordic/ncs/toolchains/20d68df7e5",
        "toolchainBinPath": "/opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk/arm-zephyr-eabi/bin",
        "toolchainVersion": "2.5.1"
      },
      "terminal": {
        "defaultProfile": null
      },
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "${nrf-connect.sdk:2.5.1}",
          "toolchain": {
            "path": ""
          },
          "ozonePath": "",
          "applications": [
            "${workspaceFolder}"
          ],
          "applicationOptions": {},
          "kconfig": {
            "interface": "kconfig"
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [],
          "taskBindings": {},
          "debugging": {
            "flash": true,
            "bindings": {},
            "justMyCode": true
          },
          "activeAppFollowActiveEditor": true,
          "deviceProvider": "",
          "flash": {
            "softreset": false,
            "erase": false,
            "recover": false
          },
          "enableTelemetry": true,
          "thirdpartyIntegration": {},
          "toolchainManager": {
            "indexURL": null,
            "installDirectory": null
          },
          "nrfutil": {
            "home": null
          },
          "defaultOpenAction": "ask"
        },
        "nordic-semiconductor.nrf-terminal": {
          "terminalMode": "character"
        }
      },
      "extensions": {
        "internal": {
          "nordic-semiconductor.nrf-connect": {
            "version": "2023.11.301",
            "path": "/Users/joe/.vscode/extensions/nordic-semiconductor.nrf-connect-2023.11.301-darwin-arm64",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": {
            "version": "2023.10.17",
            "path": "/Users/joe/.vscode/extensions/nordic-semiconductor.nrf-terminal-2023.10.17",
            "isActive": true
          },
          "nordic-semiconductor.nrf-devicetree": {
            "version": "2023.11.120",
            "path": "/Users/joe/.vscode/extensions/nordic-semiconductor.nrf-devicetree-2023.11.120",
            "isActive": true
          },
          "nordic-semiconductor.nrf-kconfig": {
            "version": "2023.11.64",
            "path": "/Users/joe/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2023.11.64",
            "isActive": true
          }
        },
        "external": {
          "marus25.cortex-debug": null,
          "ms-vscode.cpptools": "1.18.5",
          "ms-vscode.js-debug": "1.85.0",
          "ms-vscode.js-debug-companion": "1.1.2",
          "ms-vscode.vscode-js-profile-table": "1.0.8",
          "alefragnani.Bookmarks": "13.4.2",
          "ckolkman.vscode-postgres": "1.4.3",
          "DavidAnson.vscode-markdownlint": "0.53.0",
          "dbaeumer.vscode-eslint": "2.4.2",
          "eamodio.gitlens": "14.6.1",
          "espressif.esp-idf-extension": "1.6.5",
          "genieai.chatgpt-vscode": "0.0.10",
          "GitHub.copilot": "1.148.0",
          "GitHub.copilot-chat": "0.11.1",
          "github.vscode-github-actions": "0.26.2",
          "golang.go": "0.40.1",
          "hashicorp.terraform": "2.29.1",
          "mathiasfrohlich.Kotlin": "1.7.1",
          "mohsen1.prettify-json": "0.0.3",
          "ms-azuretools.vscode-docker": "1.28.0",
          "ms-python.isort": "2023.10.1",
          "ms-python.python": "2023.22.1",
          "ms-python.vscode-pylance": "2023.12.1",
          "ms-toolsai.jupyter": "2023.11.1100101639",
          "ms-toolsai.jupyter-keymap": "1.1.2",
          "ms-toolsai.jupyter-renderers": "1.0.17",
          "ms-toolsai.vscode-jupyter-cell-tags": "0.1.8",
          "ms-toolsai.vscode-jupyter-slideshow": "0.1.5",
          "ms-vscode-remote.remote-containers": "0.327.0",
          "ms-vscode.cpptools-extension-pack": "1.3.0",
          "ms-vscode.cpptools-themes": "2.0.0",
          "ms-vsliveshare.vsliveshare": "1.0.5905",
          "Prisma.prisma": "5.8.0",
          "rust-lang.rust-analyzer": "0.3.1799",
          "trond-snekvik.gnu-mapfiles": "1.1.0",
          "vadimcn.vscode-lldb": "1.10.0",
          "ziglang.vscode-zig": "0.5.1",
          "zxh404.vscode-proto3": "0.5.5"
        }
      }
    }
    
    
    lso I cannot cmd click or f12 into the the header.

  • I ended up removing the ESP-IDF extension and things started working, I think it is a sign Smiley

Related