VSCode Extension Host Keeps Crashing As Soon as First Project is Added

Bit baffled by this one, I assume it's related to the attempted nRF SDK Intellisense magic:

We do have a monorepo for various controller projects that includes two zephyr setups in lib/zephyr (latest, for non nRF projects) and lib/nordic (for nRF projects), both gitignored and set up as per respective installation instructions. Command line builds are invoked by either source .venv/bin/activate && west build ... for native Zephyr projects or nrfutil toolchain-manager launch west build -- ... for Nordic ones, with ZEPHYR_BASE etc set beforehand, and build well with all the right respective variables and dirs set.


The issue is that on an M2 MacBook, as soon as we add a project dir to the NRF CONNECT extension, the Extension Host keeps crashing every 30 seconds or so.

No error is given in any of the consoles / outputs, including the vscode js developer console. Intuitively it feels like some logic looking for manifest files, includes, ways to set up Intellisense etc gets lost or runs out of memory / in circles.

Observations:

- Most functionality of the extension does work (until it crashes), including adding build configurations, building, flashing, connecting do devices and outputs etc.

- At startup, the Extension reports multiple, mostly lib/zephyr/zephyr and lib/nordic/zephyr, but sometimes random (Found manifest file: /Users/bruno/meso/firmware/lib/nordic/modules/hal/nxp/mcux/mcux-sdk/west.yml) manifest files and suggests to initialize them, despite the main West workspaces already being initialized.

- Occasional nRF error being shown: "HMv2 SOCs must be passed to determine identifier components."

What we tried so far:

- Creating a completely blank c_cpp_properties.json configuration, cleaning up settings.json, and disabling all other Extensions with Extension bisect and manually.
- Trying to find any traces of the actual error.
- Trying to figure out if the NRF Extension traverses the entire monorepo (way too much) when trying to automate the Intellisense setup, or if it can be limited to our lib/nordic folder within it.

Support Information including full PATH etc:


// IMPORTANT: The following data can contain sensitive or confidential information about your environment.
// If you do not want others to see this information, make sure to remove it before sharing the data.

// For help and support, visit Nordic Semiconductor's DevZone at devzone.nordicsemi.com/.

{
"platform": {
"os": "darwin",
"osVersion": "Darwin Kernel Version 24.0.0: Tue Sep 24 23:37:13 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T8112",
"osKernel": "24.0.0",
"vscode": "1.96.4",
"electron": "32.2.6",
"node": "v20.18.1"
},
"system": {
"date": "2025-01-24T12:36:15.199Z",
"vscodeRoot": "/Applications/Visual Studio Code.app/Contents/Resources/app",
"nrfConnectForDesktopInstalled": true,
"vscodeUptime": "00:00:08",
"osUptime": "169:49:12",
"cpu": "Apple M2"
},
"workspace": {
"name": "meso-firmware (Workspace)",
"workspaceFile": "/Users/bruno/meso/firmware/config/meso-firmware.code-workspace",
"folders": [
"/Users/bruno/meso/firmware"
]
},
"sdks": [
{
"version": "v4.0.99",
"path": "/Users/bruno/meso/firmware/lib/zephyr"
},
{
"version": "v3.7.99",
"path": "/Users/bruno/meso/firmware/lib/nordic"
}
],
"activeBuild": "/Users/bruno/meso/firmware/cabinet/brain/build/brain",
"apps": [
{
"workspace": "/Users/bruno/meso/firmware",
"uri": "/Users/bruno/meso/firmware/cabinet/brain",
"buildConfigurations": [
{
"id": "/Users/bruno/meso/firmware/cabinet/brain/build",
"name": "build",
"boardId": "nrf54l15dk/nrf54l15/cpuapp",
"type": "Sysbuild",
"isChild": false,
"isStale": true,
"taskBindings": {
"build": [],
"pristineBuild": [],
"flash": [],
"eraseAndFlash": []
},
"toolchain": "Zephyr SDK 0.17.0"
}
]
}
],
"toolchains": [
{
"version": "2.9.0",
"path": "/opt/nordic/ncs/toolchains/b8efef2ad5"
},
{
"version": "2.8.0",
"path": "/opt/nordic/ncs/toolchains/15b490767d"
},
{
"version": "0.17.0",
"path": "/Users/bruno/zephyr-sdk-0.17.0"
}
],
"connectedDevices": [],
"tools": {
"/opt/nordic/ncs/toolchains/b8efef2ad5/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc": "0.17.0 (arm64)",
"/Applications/SEGGER/JLink/JLinkExe": "8.10j (x64,arm64)",
"/usr/local/bin/nrfjprog": "10.24.2 (x64,arm64)",
"/Users/bruno/meso/firmware/lib/nordic/nrfutil": "7.13.0 (x64,arm64)",
"/opt/nordic/ncs/toolchains/b8efef2ad5/bin/cmake": "3.21.0 (arm64)",
"/opt/nordic/ncs/toolchains/b8efef2ad5/bin/west": "1.2.0",
"/opt/nordic/ncs/toolchains/b8efef2ad5/bin/python3": "3.12.4 (arm64)",
"/opt/nordic/ncs/toolchains/b8efef2ad5/bin/ninja": "1.10.2 (arm64)",
"/opt/nordic/ncs/toolchains/b8efef2ad5/bin/gperf": "3.1 (arm64)",
"/opt/nordic/ncs/toolchains/b8efef2ad5/bin/dtc": "1.6.1 (arm64)",
"/opt/nordic/ncs/toolchains/b8efef2ad5/bin/gn": "2202 (arm64)",
"/opt/nordic/ncs/toolchains/b8efef2ad5/bin/git": "2.37.3 (arm64)",
"arm-gdbPath": "/opt/nordic/ncs/toolchains/b8efef2ad5/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb",
"riscv-gdbPath": "/opt/nordic/ncs/toolchains/b8efef2ad5/opt/zephyr-sdk/riscv64-zephyr-elf/bin/riscv64-zephyr-elf-gdb"
},
"nrfutil": {
"nrfutil-device": {
"version": "2.7.9",
"binPath": "/Users/bruno/.vscode/extensions/nordic-semiconductor.nrf-connect-2025.1.127-darwin-arm64/platform/nrfutil/bin/nrfutil-device",
"jlinkInfo": {
"description": "This version of SEGGER J-Link is different from the J-Link version that was used to test nrfutil device commands",
"expectedVersion": {
"version": "JLink_V7.94i",
"versionFormat": "string"
},
"name": "JlinkARM",
"version": "JLink_V8.10j",
"versionFormat": "string"
}
},
"nrfutil-toolchain-manager": {
"version": "0.14.4",
"binPath": "/Users/bruno/.vscode/extensions/nordic-semiconductor.nrf-connect-2025.1.127-darwin-arm64/platform/nrfutil/bin/nrfutil-toolchain-manager"
}
},
"environment": {
"westEnv": {
"GIT_EXEC_PATH": "/opt/nordic/ncs/toolchains/b8efef2ad5/Cellar/git/2.37.3/libexec/git-core",
"HOME": "/Users/bruno",
"PATH": "/opt/nordic/ncs/toolchains/b8efef2ad5/bin:/opt/nordic/ncs/toolchains/b8efef2ad5/usr/bin:/opt/nordic/ncs/toolchains/b8efef2ad5/usr/local/bin:/opt/nordic/ncs/toolchains/b8efef2ad5/opt/bin:/opt/nordic/ncs/toolchains/b8efef2ad5/opt/nanopb/generator-bin:/opt/nordic/ncs/toolchains/b8efef2ad5/opt/zephyr-sdk/arm-zephyr-eabi/bin:/opt/nordic/ncs/toolchains/b8efef2ad5/opt/zephyr-sdk/riscv64-zephyr-elf/bin:/Users/bruno/.bun/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/opt/homebrew/opt/postgresql@15/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/ST/STM32CubeCLT_1.17.0:/opt/ST/STM32CubeCLT_1.17.0/GNU-tools-for-STM32/bin:/opt/ST/STM32CubeCLT_1.17.0/STM32CubeProgrammer/bin:/opt/ST/STM32CubeCLT_1.17.0/STLink-gdb-server/bin:/opt/ST/STM32CubeCLT_1.17.0/CMake/bin:/opt/ST/STM32CubeCLT_1.17.0/Ninja/bin:/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:/Users/bruno/meso/firmware/lib/nordic:/Applications/ArmGNUToolchain/14.2.rel1/aarch64-none-elf/bin:/Users/bruno/.bun/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/opt/homebrew/opt/postgresql@15/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/ST/STM32CubeCLT_1.17.0:/opt/ST/STM32CubeCLT_1.17.0/GNU-tools-for-STM32/bin:/opt/ST/STM32CubeCLT_1.17.0/STM32CubeProgrammer/bin:/opt/ST/STM32CubeCLT_1.17.0/STLink-gdb-server/bin:/opt/ST/STM32CubeCLT_1.17.0/CMake/bin:/opt/ST/STM32CubeCLT_1.17.0/Ninja/bin:/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:/Users/bruno/meso/firmware/lib/nordic:/Applications/ArmGNUToolchain/14.2.rel1/aarch64-none-elf/bin",
"ZEPHYR_BASE": "/Users/bruno/meso/firmware/lib/nordic/zephyr",
"ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
"ZEPHYR_SDK_INSTALL_DIR": "/opt/nordic/ncs/toolchains/b8efef2ad5/opt/zephyr-sdk",
"USER": "bruno"
},
"inherited": {
"ELECTRON_RUN_AS_NODE": "1",
"HOME": "/Users/bruno",
"PATH": "/Users/bruno/.bun/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/opt/homebrew/opt/postgresql@15/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/ST/STM32CubeCLT_1.17.0:/opt/ST/STM32CubeCLT_1.17.0/GNU-tools-for-STM32/bin:/opt/ST/STM32CubeCLT_1.17.0/STM32CubeProgrammer/bin:/opt/ST/STM32CubeCLT_1.17.0/STLink-gdb-server/bin:/opt/ST/STM32CubeCLT_1.17.0/CMake/bin:/opt/ST/STM32CubeCLT_1.17.0/Ninja/bin:/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:/Users/bruno/meso/firmware/lib/nordic:/Applications/ArmGNUToolchain/14.2.rel1/aarch64-none-elf/bin",
"USER": "bruno"
}
},
"terminal": {
"defaultProfile": null
},
"config": {
"nordic-semiconductor.nrf-connect": {
"topdir": "",
"toolchain": {
"path": ""
},
"ozonePath": "",
"applications": [
"${workspaceFolder}/cabinet/brain"
],
"applicationOptions": {},
"kconfig": {
"interface": "kconfig"
},
"west": {
"env": {
"$base": "terminal"
}
},
"boardRoots": [],
"taskBindings": {},
"buildTerminal": {
"condensedProgress": true
},
"debugging": {
"flash": false,
"bindings": {
"${workspaceFolder}/cabinet/brain/build_1/brain": "Launch brain"
},
"justMyCode": false
},
"activeAppFollowActiveEditor": true,
"flash": {
"softreset": false,
"erase": false,
"recover": false
},
"enableTelemetry": true,
"thirdpartyIntegration": {},
"toolchainManager": {
"indexURL": null,
"installDirectory": null
},
"nrfutil": {
"home": null
},
"defaultOpenAction": "ask",
"terminalProfile": {
"shell": null
}
},
"nordic-semiconductor.nrf-terminal": {
"terminalMode": "character"
}
},
"extensions": {
"internal": {
"nordic-semiconductor.nrf-connect": {
"version": "2025.1.127",
"path": "/Users/bruno/.vscode/extensions/nordic-semiconductor.nrf-connect-2025.1.127-darwin-arm64",
"isActive": true
},
"nordic-semiconductor.nrf-terminal": {
"version": "2024.9.14",
"path": "/Users/bruno/.vscode/extensions/nordic-semiconductor.nrf-terminal-2024.9.14",
"isActive": true
},
"nordic-semiconductor.nrf-devicetree": {
"version": "2024.12.15",
"path": "/Users/bruno/.vscode/extensions/nordic-semiconductor.nrf-devicetree-2024.12.15",
"isActive": true
},
"nordic-semiconductor.nrf-kconfig": {
"version": "2024.12.13",
"path": "/Users/bruno/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2024.12.13",
"isActive": true
}
},
"external": {
"marus25.cortex-debug": null,
"ms-vscode.cpptools": "1.22.11",
"ms-vscode.js-debug": "1.96.0",
"ms-vscode.js-debug-companion": "1.1.3",
"ms-vscode.vscode-js-profile-table": "1.0.10",
"dan-c-underwood.arm": "1.7.4",
"GitHub.codespaces": "1.17.3",
"hangxingliu.vscode-systemd-support": "3.0.0",
"mcu-debug.debug-tracker-vscode": "0.0.15",
"mcu-debug.memory-view": "0.0.25",
"mcu-debug.peripheral-viewer": "1.4.6",
"mcu-debug.rtos-views": "0.0.7",
"ms-python.debugpy": "2024.14.0",
"ms-python.python": "2024.22.2",
"ms-python.vscode-pylance": "2024.12.1",
"ms-toolsai.jupyter": "2024.11.0",
"ms-toolsai.jupyter-keymap": "1.1.2",
"ms-toolsai.jupyter-renderers": "1.0.21",
"ms-toolsai.vscode-jupyter-cell-tags": "0.1.9",
"ms-toolsai.vscode-jupyter-slideshow": "0.1.6",
"ms-vscode.cpptools-extension-pack": "1.3.0",
"ms-vscode.cpptools-themes": "2.0.0",
"ms-vscode.hexeditor": "1.11.1",
"ms-vscode.makefile-tools": "0.11.13",
"trond-snekvik.gnu-mapfiles": "1.1.0",
"twxs.cmake": "0.0.17",
"ZixuanWang.linkerscript": "1.0.4"
}
}
}


Related