Issue with compiler and debug in VS Code with nRF Connect

I/my admin  installed the SDK and visual studio though the nRF connect tool chain manager.

When i open visual studio through the toolchain manager it prompts me

to "Select a kit for..."

with the two option 

Scan for kits (...compilers...)

unspecified

When I try to debug it gives me the message 

Unable to start debugging: Unable to find J-Link directory to find JLinkGDBServerCL executable. Please make sure that J-Link is installed and that the 'HKEY_LOCAL_MACHINE\Software\SEGGER\J-Link' registry key is defined correctly.

This is installed on a admin controlled machine where I just have a user profile.

Any insight you can provide into how to resolve this would be appreciated.

I will need to pass on the fix to my administrator as I have no control over the installation.

Is there an issue with installing as an administrator and running as a user?

Issues with Debugging using VScode with nRF connect and nrf sdk2.docx

When I select scan for kits nothing happens 

When i select unspecified:

[variant] Loaded new set of variants

[kit] Successfully loaded 0 kits from C:\Users\deirdre.hackett\AppData\Local\CMakeTools\cmake-tools-kits.json

[kit] Successfully loaded 0 kits from C:\Users\deirdre.hackett\AppData\Local\CMakeTools\cmake-tools-kits.json

[main] Configuring folder: hello_world_test5

Support:

As it is not related to original topic of the ticket, you should register a new ticket. That said, the "select a kit for..." message is not related to the nRF Connect for VS Code extension but another extension in VS Code I believe. It is unfortunately misleading, and it can be ignored.

In you case, you should check what devices are connected under "Connected devices" in the nRF Connect extension

I will forward your feedback to our VS code extension team, as this is valuable information in regards to user experience. 

Dtyn said:

When I try to debug it gives me the message 

Unable to start debugging: Unable to find J-Link directory to find JLinkGDBServerCL executable. Please make sure that J-Link is installed and that the 'HKEY_LOCAL_MACHINE\Software\SEGGER\J-Link' registry key is defined correctly.

Support:

What debug button are you clicking? Make sure to use the one in our extension: 

 Yes I am definitely pressing the debug button in the nRF Connect extension.

My admin installed everything in his admin profile other than VS code that he installed as a network device.

Let me know if there other information you need to see.

Is this an issue with an environment variable or registry key.

Parents Reply Children
  • The setup looks correct as far as i can see

  • Hello again Deidre.

    I will forward this information to our developer team along with the support information you have provided in your previous ticket. 

    Kind regards,
    Øyvind

  • Just remembered that you reinstalled the SDK, could you please generate support information one more time? Also, can you provide the version number of the nRF Connect for Desktop application, and the VS Code?

  • IMPORTANT: The data below could contain sensitive or confidential information about your environment.
    If you do not wish this to be seen by others, please make sure to remove it before sharing.

    For help and support, visit the Nordic DevZone at devzone.nordicsemi.com/.

    {
    "platform": {
    "os": "win32",
    "osVersion": "Windows 10 Pro",
    "osKernel": "10.0.19044",
    "vscode": "1.67.2",
    "electron": "17.4.1",
    "node": "v16.13.0"
    },
    "system": {
    "date": "2022-05-25T14:27:48.146Z",
    "vscodeRoot": "c:\\Program Files\\Microsoft VS Code\\resources\\app",
    "nrfConnectForDesktopInstalled": true,
    "vscodeUptime": "00:00:25",
    "osUptime": "24:30:10",
    "cpu": {
    "model": "11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz",
    "speed": "1498 MHz",
    "count": 4
    },
    "memory": {
    "total": "15.73 GB",
    "free": "8.26 GB"
    }
    },
    "workspace": {
    "name": null,
    "workspaceFile": null,
    "folders": []
    },
    "extensions": {
    "internal": {
    "nordic-semiconductor.nrf-connect": {
    "version": "2022.4.219",
    "path": "c:\\Users\\anon\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2022.4.219",
    "isActive": true
    },
    "nordic-semiconductor.nrf-terminal": {
    "version": "2022.4.61",
    "path": "c:\\Users\\anon\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2022.4.61",
    "isActive": true
    },
    "nordic-semiconductor.devicetree": null,
    "nordic-semiconductor.kconfig": null
    },
    "external": {
    "marus25.cortex-debug": "1.4.4",
    "ms-vscode.cpptools": "1.9.8",
    "ms-vscode-remote.remote-wsl-recommender": "0.0.15",
    "ms-vscode.js-debug": "1.67.2",
    "ms-vscode.js-debug-companion": "1.0.18",
    "ms-vscode.references-view": "0.0.89",
    "ms-vscode.vscode-js-profile-table": "1.0.1",
    "cschlosser.doxdocgen": "1.4.0",
    "jeff-hykin.better-cpp-syntax": "1.15.14",
    "ms-vscode.cmake-tools": "1.10.5",
    "ms-vscode.cpptools-extension-pack": "1.2.0",
    "ms-vscode.cpptools-themes": "1.0.0",
    "redhat.vscode-yaml": "1.7.0",
    "trond-snekvik.gnu-mapfiles": "1.1.0",
    "twxs.cmake": "0.0.17"
    }
    },
    "tools": {
    "C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.15.4",
    "nrfutil": "Not found",
    "c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\opt\\bin\\cmake.exe": "3.20.5",
    "c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\opt\\bin\\Scripts\\west.exe": "0.12.0",
    "c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\opt\\bin\\python.exe": "3.8.2",
    "c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\opt\\bin\\ninja.exe": "1.9.0",
    "c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\opt\\bin\\gperf.exe": "3.1",
    "c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\opt\\bin\\dtc.exe": "1.4.7",
    "c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\opt\\bin\\arm-none-eabi-gcc.exe": "9-2019-q4-major",
    "c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\opt\\bin\\gn.exe": "1977",
    "c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\mingw64\\bin\\git.exe": "2.26.2.windows.1"
    },
    "sdks": [],
    "toolchains": [],
    "connectedDevices": [],
    "deviceProviders": [
    "nrfjprog"
    ],
    "config": {
    "nordic-semiconductor.nrf-connect": {
    "topdir": "c:\\Users\\anon\\nordsc\\v1.9.1",
    "toolchain": {
    "path": "c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain"
    },
    "ozonePath": "",
    "applications": [],
    "applicationOptions": {},
    "kconfig": {
    "interface": "kconfig"
    },
    "welcome": {
    "showOnStartup": false
    },
    "west": {
    "env": {
    "$base": "terminal"
    }
    },
    "boardRoots": [],
    "enableTelemetry": true
    },
    "nordic-semiconductor.nrf-terminal": {
    "terminalMode": "character"
    },
    "nordic-semiconductor.devicetree": {
    "modules": [
    "${zephyrBase}",
    "${zephyrBase}/../nrf",
    "."
    ],
    "zephyr": "",
    "ctxFile": "",
    "defaultBoard": ""
    },
    "nordic-semiconductor.kconfig": {
    "root": "",
    "env": {},
    "cfiles": true,
    "disable": false,
    "zephyr": {
    "base": ""
    },
    "python": "C:\\Program Files\\Python36\\python.exe",
    "liveValue": true
    },
    "marus25.cortex-debug": {
    "armToolchainPath": null,
    "armToolchainPrefix": "arm-none-eabi",
    "gdbPath": null,
    "objdumpPath": null,
    "JLinkGDBServerPath": null,
    "openocdPath": null,
    "pyocdPath": null,
    "PEGDBServerPath": null,
    "stutilPath": null,
    "stlinkPath": null,
    "stm32cubeprogrammer": null,
    "enableTelemetry": true,
    "flattenAnonymous": false,
    "registerUseNaturalFormat": true,
    "variableUseNaturalFormat": true,
    "dbgServerLogfile": null,
    "showRTOS": false,
    "showDevDebugOutput": "none"
    }
    },
    "environment": {
    "westExe": "c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\opt\\bin\\Scripts\\west.exe",
    "westEnv": {
    "ELECTRON_RUN_AS_NODE": "1",
    "HOME": "C:\\Users\\anon",
    "HOMEDRIVE": "C:",
    "HOMEPATH": "\\Users\\anon",
    "Path": "c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\mingw64\\bin;c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\mingw64\\libexec\\git-core;c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\opt\\bin;c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\opt\\bin\\Scripts;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\Wolfram Research\\WolframScript\\;C:\\Program Files\\MATLAB\\R2020b\\runtime\\win64;C:\\Program Files\\MATLAB\\R2020b\\bin;C:\\Program Files\\PuTTY\\;C:\\Program Files\\nodejs\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\Microsoft VS Code\\bin;C:\\Users\\anon\\AppData\\Local\\Microsoft\\WindowsApps;",
    "ZEPHYR_BASE": "c:\\Users\\anon\\nordsc\\v1.9.1\\zephyr",
    "GNUARMEMB_TOOLCHAIN_PATH": "c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\opt",
    "ZEPHYR_TOOLCHAIN_VARIANT": "gnuarmemb",
    "PYTHONPATH": "c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\opt\\bin;c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\opt\\bin\\Lib;c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\opt\\bin\\Lib\\site-packages",
    "Python3_ROOT": "c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\opt\\bin"
    },
    "toolchainPath": "c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain",
    "toolchainBinPath": "c:\\Users\\anon\\nordsc\\v1.9.1\\toolchain\\opt\\bin",
    "toolchainVersion": "1.9.1"
    },
    "terminal": {
    "shell": null,
    "defaultProfile": null
    }
    }

Related