Unable to Debug in VSCode - MacOS - spawn Unknown system error -86

Hi folks,

Recently picked up a new MacBook (M series) and was excited to try some sample projects on my nrf52840dk.

Unfortunately upon trying to Debug, I get the following error: spawn Unknown system error -86

I took a quick look at the forums and found the following thread but unfortunately this did not lead me anywhere

 Cannot debug project in VS code [spawn Unknown system error -86] 

I have included my "support info" here

// 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 https://devzone.nordicsemi.com/.

{
  "platform": {
    "os": "darwin",
    "osVersion": "Darwin Kernel Version 24.1.0: Thu Nov 14 18:15:21 PST 2024; root:xnu-11215.41.3~13/RELEASE_ARM64_T6041",
    "osKernel": "24.1.0",
    "vscode": "1.95.3",
    "electron": "32.2.1",
    "node": "v20.18.0"
  },
  "system": {
    "date": "2024-12-02T03:42:53.533Z",
    "vscodeRoot": "/Applications/Visual Studio Code.app/Contents/Resources/app",
    "nrfConnectForDesktopInstalled": true,
    "vscodeUptime": "00:23:43",
    "osUptime": "23:25:51",
    "cpu": "Apple M4 Pro"
  },
  "workspace": {
    "name": "blinky",
    "workspaceFile": null,
    "folders": [
      "/opt/nordic/ncs/v2.8.0/zephyr/samples/basic/blinky"
    ]
  },
  "sdks": [
    {
      "version": "v2.8.0",
      "path": "/opt/nordic/ncs/v2.8.0"
    },
    {
      "version": "v2.7.0",
      "path": "/opt/nordic/ncs/v2.7.0"
    }
  ],
  "activeBuild": "/opt/nordic/ncs/v2.8.0/zephyr/samples/basic/blinky/build",
  "apps": [
    {
      "workspace": "/opt/nordic/ncs/v2.8.0/zephyr/samples/basic/blinky",
      "uri": "/opt/nordic/ncs/v2.8.0/zephyr/samples/basic/blinky",
      "buildConfigurations": [
        {
          "id": "/opt/nordic/ncs/v2.8.0/zephyr/samples/basic/blinky/build",
          "name": "build",
          "boardId": "nrf52840dk/nrf52840",
          "type": "Zephyr",
          "isChild": false,
          "isStale": false,
          "taskBindings": {
            "build": [],
            "pristineBuild": [],
            "flash": [],
            "eraseAndFlash": []
          }
        }
      ]
    }
  ],
  "topdir": "/opt/nordic/ncs/v2.8.0",
  "workspaceState": "workspace-ready",
  "toolchains": [
    {
      "version": "2.8.0",
      "path": "/opt/nordic/ncs/toolchains/15b490767d"
    },
    {
      "version": "2.7.0",
      "path": "/opt/nordic/ncs/toolchains/f8037e9b83"
    }
  ],
  "activeToolchain": {
    "type": "installation",
    "path": "/opt/nordic/ncs/toolchains/15b490767d",
    "version": "2.8.0",
    "displayName": "nRF Connect SDK Toolchain v2.8.0"
  },
  "connectedDevices": [
    {
      "serialNumber": "001050248158"
    }
  ],
  "tools": {
    "/opt/nordic/ncs/toolchains/15b490767d/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc": "0.16.8 (arm64)",
    "/Applications/SEGGER/JLink/JLinkExe": "8.10i (x64,arm64)",
    "/usr/local/bin/nrfjprog": "10.24.2 (x64,arm64)",
    "/opt/nordic/ncs/toolchains/15b490767d/bin/cmake": "3.21.0 (arm64)",
    "/opt/nordic/ncs/toolchains/15b490767d/bin/west": "1.2.0",
    "/opt/nordic/ncs/toolchains/15b490767d/bin/python3": "3.12.4 (arm64)",
    "/opt/nordic/ncs/toolchains/15b490767d/bin/ninja": "1.10.2 (arm64)",
    "/opt/nordic/ncs/toolchains/15b490767d/bin/gperf": "3.1 (arm64)",
    "/opt/nordic/ncs/toolchains/15b490767d/bin/dtc": "1.6.1 (arm64)",
    "/opt/nordic/ncs/toolchains/15b490767d/bin/gn": "2201 (arm64)",
    "/opt/nordic/ncs/toolchains/15b490767d/bin/git": "2.37.3 (arm64)",
    "arm-gdbPath": "/opt/nordic/ncs/toolchains/15b490767d/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb",
    "riscv-gdbPath": "/opt/nordic/ncs/toolchains/15b490767d/opt/zephyr-sdk/riscv64-zephyr-elf/bin/riscv64-zephyr-elf-gdb"
  },
  "nrfutil": {
    "nrfutil-device": {
      "version": "2.7.2",
      "binPath": "/Users/username/.vscode/extensions/nordic-semiconductor.nrf-connect-2024.11.75-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.10i",
        "versionFormat": "string"
      }
    },
    "nrfutil-toolchain-manager": {
      "version": "0.14.4",
      "binPath": "/Users/username/.vscode/extensions/nordic-semiconductor.nrf-connect-2024.11.75-darwin-arm64/platform/nrfutil/bin/nrfutil-toolchain-manager"
    }
  },
  "environment": {
    "westEnv": {
      "GIT_EXEC_PATH": "/opt/nordic/ncs/toolchains/15b490767d/Cellar/git/2.37.3/libexec/git-core",
      "HOME": "/Users/username",
      "PATH": "/opt/nordic/ncs/toolchains/15b490767d/bin:/opt/nordic/ncs/toolchains/15b490767d/usr/bin:/opt/nordic/ncs/toolchains/15b490767d/usr/local/bin:/opt/nordic/ncs/toolchains/15b490767d/opt/bin:/opt/nordic/ncs/toolchains/15b490767d/opt/nanopb/generator-bin:/opt/nordic/ncs/toolchains/15b490767d/opt/zephyr-sdk/arm-zephyr-eabi/bin:/opt/nordic/ncs/toolchains/15b490767d/opt/zephyr-sdk/riscv64-zephyr-elf/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:/Users/username/.cargo/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:/Users/username/.cargo/bin",
      "ZEPHYR_BASE": "/opt/nordic/ncs/v2.8.0/zephyr",
      "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
      "ZEPHYR_SDK_INSTALL_DIR": "/opt/nordic/ncs/toolchains/15b490767d/opt/zephyr-sdk",
      "USER": "username"
    },
    "inherited": {
      "ELECTRON_RUN_AS_NODE": "1",
      "HOME": "/Users/username",
      "PATH": "/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:/Users/username/.cargo/bin",
      "USER": "username"
    }
  },
  "terminal": {
    "defaultProfile": null
  },
  "config": {
    "nordic-semiconductor.nrf-connect": {
      "topdir": "${nrf-connect.sdk:2.8.0}",
      "toolchain": {
        "path": "${nrf-connect.toolchain:2.8.0}"
      },
      "ozonePath": "",
      "applications": [],
      "applicationOptions": {},
      "kconfig": {
        "interface": "kconfig"
      },
      "west": {
        "env": {
          "$base": "terminal"
        }
      },
      "boardRoots": [],
      "taskBindings": {},
      "buildTerminal": {
        "condensedProgress": true
      },
      "debugging": {
        "flash": true,
        "bindings": {},
        "justMyCode": false
      },
      "activeAppFollowActiveEditor": true,
      "flash": {
        "softreset": false,
        "erase": false,
        "recover": false
      },
      "enableTelemetry": null,
      "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": "2024.11.75",
        "path": "/Users/username/.vscode/extensions/nordic-semiconductor.nrf-connect-2024.11.75-darwin-arm64",
        "isActive": true
      },
      "nordic-semiconductor.nrf-terminal": {
        "version": "2024.9.14",
        "path": "/Users/username/.vscode/extensions/nordic-semiconductor.nrf-terminal-2024.9.14",
        "isActive": true
      },
      "nordic-semiconductor.nrf-devicetree": {
        "version": "2024.11.36",
        "path": "/Users/username/.vscode/extensions/nordic-semiconductor.nrf-devicetree-2024.11.36",
        "isActive": true
      },
      "nordic-semiconductor.nrf-kconfig": {
        "version": "2024.11.16",
        "path": "/Users/username/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2024.11.16",
        "isActive": true
      }
    },
    "external": {
      "marus25.cortex-debug": null,
      "ms-vscode.cpptools": "1.22.11",
      "ms-vscode.js-debug": "1.95.3",
      "ms-vscode.js-debug-companion": "1.1.3",
      "ms-vscode.vscode-js-profile-table": "1.0.10",
      "ms-vscode.cmake-tools": "1.19.52",
      "ms-vscode.cpptools-extension-pack": "1.3.0",
      "ms-vscode.cpptools-themes": "2.0.0",
      "trond-snekvik.gnu-mapfiles": "1.1.0",
      "twxs.cmake": "0.0.17"
    }
  }
}

I do realize that I am using Segger J-link v8.10i. Downgrading to v7.94i did not fix my problem so I updated it back to v8.10

A couple of additional notes:

  • I am using a basic blinky project from the sample for the testing
  • Flashing works just fine
  • I am able to use the command line version of gdb to set breakpoints and step through the code without issue
  • This board and sample projects work my other PCs (Linux and Windows)

Your assistance is greatly appreciated 

Related