Thread viewer empty during debug

I have two computers where nRF Connect for VSCode behaves differently in the sense that in one computer when I start debug it stops at the first line of the main and I see thread viewer correctly showing the threads and the other computer stops first in the debug at some setup or init script and not in the main. In addition the Thread Viewer is empty.

I use nRF Connect SDK 2.6.1 from c:\ncs\v2.6.1\nrf\west.yml

I did some cleanup by removing VSCode, Segger probe softwares, nRF Connect for Desktop and tools. Then I searched in Windows in %USERPROFILE% and %APPDATA% Local and Roaming anything I could find related to nRF, VSCode, Segger tools. Then I reinstalled and I use a shared profile and the same nRF52840DK board. In the profile is installed nRF Connect for VSCode Extension Pack, which in turn install what is needed.

Despite repeating the same cleanup  and setup, in the home computer it works, and in the workplace doesn't.

I have a feeling that there are some hidden configs which I don't know, therefore is not enough to uninstall and cleanup in  %USERPROFILE% and %APPDATA% .

I really wished to have reliable and repeatable setup. Does anybody where it is saved the configuration regarding where it stops first at the staring point of Debug session?

Where exactly have to be made manual cleanup, to completely reset the developer environment?

Parents Reply Children
  • I tried inter_less2_exer1_solution, the result is the same.
    Here is the support information

    {
      "platform": {
        "os": "win32",
        "osVersion": "Windows 11 Pro",
        "osKernel": "10.0.22631",
        "vscode": "1.94.0",
        "electron": "30.5.1",
        "node": "v20.16.0"
      },
      "system": {
        "date": "2024-10-08T13:16:18.295Z",
        "vscodeRoot": "c:\\Users\\My Username\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
        "nrfConnectForDesktopInstalled": true,
        "vscodeUptime": "00:13:23",
        "osUptime": "07:23:14",
        "cpu": "AMD Ryzen 9 3950X 16-Core Processor"
      },
      "workspace": {
        "name": "devademy",
        "workspaceFile": null,
        "folders": [
          "e:\\w\\EASY6-ws\\devademy"
        ]
      },
      "sdks": [
        {
          "version": "v2.6.1",
          "path": "c:\\ncs\\v2.6.1"
        },
        {
          "version": "v3.6.0",
          "path": "e:\\w\\EASY6-ws\\zephide"
        },
        {
          "version": "v3.5.99",
          "path": "e:\\w\\sandbox-zephyr\\zephyrproject"
        },
        {
          "version": "v3.5.99",
          "path": "e:\\w\\zephyr-ws\\zephyrproject"
        }
      ],
      "activeBuild": "e:\\w\\EASY6-ws\\devademy\\inter_less2_exer1_solution\\build",
      "apps": [
        {
          "workspace": "e:\\w\\EASY6-ws\\devademy",
          "uri": "e:\\w\\EASY6-ws\\devademy\\hello_world",
          "buildConfigurations": [
            {
              "id": "e:\\w\\EASY6-ws\\devademy\\hello_world\\build",
              "name": "build",
              "boardId": "devacademy_nrf52840",
              "type": "Zephyr",
              "isChild": false,
              "isStale": false,
              "taskBindings": {
                "build": [],
                "pristineBuild": [],
                "flash": [],
                "eraseAndFlash": []
              }
            }
          ]
        },
        {
          "workspace": "e:\\w\\EASY6-ws\\devademy",
          "uri": "e:\\w\\EASY6-ws\\devademy\\inter_less1_exer1_solution_1",
          "buildConfigurations": [
            {
              "id": "e:\\w\\EASY6-ws\\devademy\\inter_less1_exer1_solution_1\\build",
              "name": "build",
              "boardId": "nrf52840dk_nrf52840",
              "type": "Zephyr",
              "isChild": false,
              "isStale": false,
              "taskBindings": {
                "build": [],
                "pristineBuild": [],
                "flash": [],
                "eraseAndFlash": []
              }
            }
          ]
        },
        {
          "workspace": "e:\\w\\EASY6-ws\\devademy",
          "uri": "e:\\w\\EASY6-ws\\devademy\\inter_less2_exer1",
          "buildConfigurations": [
            {
              "id": "e:\\w\\EASY6-ws\\devademy\\inter_less2_exer1\\build",
              "name": "build",
              "boardId": "nrf52840dk_nrf52840",
              "type": "Zephyr",
              "isChild": false,
              "isStale": false,
              "taskBindings": {
                "build": [],
                "pristineBuild": [],
                "flash": [],
                "eraseAndFlash": []
              }
            }
          ]
        },
        {
          "workspace": "e:\\w\\EASY6-ws\\devademy",
          "uri": "e:\\w\\EASY6-ws\\devademy\\inter_less2_exer1_solution",
          "buildConfigurations": [
            {
              "id": "e:\\w\\EASY6-ws\\devademy\\inter_less2_exer1_solution\\build",
              "name": "build",
              "boardId": "nrf21540dk_nrf52840",
              "type": "Zephyr",
              "isChild": false,
              "isStale": false,
              "taskBindings": {
                "build": [],
                "pristineBuild": [],
                "flash": [],
                "eraseAndFlash": []
              }
            }
          ]
        },
        {
          "workspace": "e:\\w\\EASY6-ws\\devademy",
          "uri": "e:\\w\\EASY6-ws\\devademy\\inter_less2_exer2",
          "buildConfigurations": [
            {
              "id": "e:\\w\\EASY6-ws\\devademy\\inter_less2_exer2\\build",
              "name": "build",
              "boardId": "nrf52840dk_nrf52840",
              "type": "Zephyr",
              "isChild": false,
              "isStale": false,
              "taskBindings": {
                "build": [],
                "pristineBuild": [],
                "flash": [],
                "eraseAndFlash": []
              }
            }
          ]
        },
        {
          "workspace": "e:\\w\\EASY6-ws\\devademy",
          "uri": "e:\\w\\EASY6-ws\\devademy\\inter_less2_exer3",
          "buildConfigurations": [
            {
              "id": "e:\\w\\EASY6-ws\\devademy\\inter_less2_exer3\\build",
              "name": "build",
              "boardId": "nrf52840dk_nrf52840",
              "type": "Zephyr",
              "isChild": false,
              "isStale": false,
              "taskBindings": {
                "build": [],
                "pristineBuild": [],
                "flash": [],
                "eraseAndFlash": []
              }
            }
          ]
        }
      ],
      "topdir": "c:\\ncs\\v2.6.1",
      "workspaceState": "freestanding-ready",
      "toolchains": [
        {
          "version": "2.6.1",
          "path": "c:\\ncs\\toolchains\\cf2149caf2"
        }
      ],
      "activeToolchain": {
        "type": "installation",
        "path": "c:\\ncs\\toolchains\\cf2149caf2",
        "version": "2.6.1",
        "displayName": "nRF Connect SDK Toolchain v2.6.1"
      },
      "connectedDevices": [
        {
          "serialNumber": "000683118369",
          "boardVersion": "PCA10056",
          "deviceFamily": "NRF52_FAMILY",
          "deviceVersion": "NRF52840_xxAA_REV2",
          "jlinkObFirmwareVersion": "J-Link OB-SAM3U128-V2-NordicSemi compiled Apr 11 2024 17:43:52",
          "protectionStatus": "NRFDL_PROTECTION_STATUS_NONE"
        }
      ],
      "deviceProvider": "nrfutil",
      "tools": {
        "C:\\ncs\\toolchains\\cf2149caf2\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gcc.exe": "0.16.5",
        "C:\\Program Files\\SEGGER\\JLink_V794e\\JLink.exe": "7.94e",
        "C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.24.2",
        "C:\\ncs\\toolchains\\cf2149caf2\\cmake": "3.21.0",
        "C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\Scripts\\west.exe": "1.2.0",
        "C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\python.exe": "3.9.13",
        "C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\ninja.exe": "1.10.2",
        "C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\gperf.exe": "3.1",
        "C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\dtc.exe": "1.4.7",
        "C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\gn.exe": "2154",
        "C:\\ncs\\toolchains\\cf2149caf2\\mingw64\\bin\\git.exe": "2.37.3.windows.1",
        "arm-gdbPath": "c:\\ncs\\toolchains\\cf2149caf2\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gdb.exe",
        "riscv-gdbPath": "C:\\ncs\\toolchains\\cf2149caf2\\opt\\zephyr-sdk\\riscv64-zephyr-elf\\bin\\riscv64-zephyr-elf-gdb.exe"
      },
      "nrfutil": {
        "nrfutil-device": {
          "version": "2.5.0",
          "binPath": "c:\\Users\\My Username\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2024.9.87-win32-x64\\platform\\nrfutil\\bin\\nrfutil-device"
        },
        "nrfutil-toolchain-manager": {
          "version": "0.14.4",
          "binPath": "c:\\Users\\My Username\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2024.9.87-win32-x64\\platform\\nrfutil\\bin\\nrfutil-toolchain-manager"
        }
      },
      "environment": {
        "westEnv": {
          "HOME": "C:\\Users\\My Username",
          "HOMEDRIVE": "C:",
          "HOMEPATH": "\\Users\\My Username",
          "PATH": "C:\\ncs\\toolchains\\cf2149caf2;C:\\ncs\\toolchains\\cf2149caf2\\mingw64\\bin;C:\\ncs\\toolchains\\cf2149caf2\\bin;C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin;C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\Scripts;C:\\ncs\\toolchains\\cf2149caf2\\opt\\nanopb\\generator-bin;C:\\ncs\\toolchains\\cf2149caf2\\opt\\zephyr-sdk\\aarch64-zephyr-elf\\bin;C:\\ncs\\toolchains\\cf2149caf2\\opt\\zephyr-sdk\\x86_64-zephyr-elf\\bin;C:\\ncs\\toolchains\\cf2149caf2\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin;C:\\ncs\\toolchains\\cf2149caf2\\opt\\zephyr-sdk\\riscv64-zephyr-elf\\bin;c:\\Users\\My Username\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2024.9.87-win32-x64\\platform\\nrfutil\\lib\\nrfutil-toolchain-manager;C:\\Python311\\Scripts\\;C:\\Python311\\;C:\\Program Files\\Lapce\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\PuTTY\\;C:\\Program Files\\gitui\\bin\\;C:\\Program Files\\LLVM\\bin;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\dotnet\\;C:\\Program Files\\nodejs\\;C:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin\\;C:\\Program Files\\IVI Foundation\\VISA\\Win64\\Bin\\;C:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin;C:\\Program Files\\usbipd-win\\;C:\\Program Files\\TortoiseSVN\\bin;C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit\\;C:\\Program Files\\CMake\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Users\\My Username\\.cargo\\bin;C:\\tools\\miniforge-;C:\\tools\\miniforge-\\Library\\mingw-w64\\bin;C:\\tools\\miniforge-\\Library\\usr\\bin;C:\\tools\\miniforge-\\Library\\bin;C:\\tools\\miniforge-\\Scripts;C:\\Microchip\\SoftConsole-v2021.1\\arm-none-eabi-gcc\\bin;C:\\Program Files\\Conan\\conan;C:\\Users\\My Username\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\My Username\\AppData\\Local\\gitkraken\\bin;C:\\Program Files\\Graphviz\\bin;C:\\tools\\jdk-21.0.1\\bin;C:\\Program Files (x86)\\GnuWin32\\bin;C:\\tools\\bin;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin;C:\\tools\\openocd\\bin;C:\\tools\\gcc-arm-none-eabi\\bin;C:\\Users\\My Username\\AppData\\Roaming\\npm;C:\\Users\\My Username\\AppData\\Local\\Programs\\Microsoft VS Code\\bin",
          "ZEPHYR_BASE": "c:\\ncs\\v2.6.1\\zephyr",
          "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
          "ZEPHYR_SDK_INSTALL_DIR": "C:\\ncs\\toolchains\\cf2149caf2\\opt\\zephyr-sdk",
          "PYTHONPATH": "C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin;C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\Lib;C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\Lib\\site-packages"
        },
        "inherited": {
          "HOME": "C:\\Users\\My Username",
          "HOMEDRIVE": "C:",
          "HOMEPATH": "\\Users\\My Username",
          "Path": "C:\\Python311\\Scripts\\;C:\\Python311\\;C:\\Program Files\\Lapce\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\PuTTY\\;C:\\Program Files\\gitui\\bin\\;C:\\Program Files\\LLVM\\bin;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\dotnet\\;C:\\Program Files\\nodejs\\;C:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin\\;C:\\Program Files\\IVI Foundation\\VISA\\Win64\\Bin\\;C:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin;C:\\Program Files\\usbipd-win\\;C:\\Program Files\\TortoiseSVN\\bin;C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit\\;C:\\Program Files\\CMake\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Users\\My Username\\.cargo\\bin;C:\\tools\\miniforge-;C:\\tools\\miniforge-\\Library\\mingw-w64\\bin;C:\\tools\\miniforge-\\Library\\usr\\bin;C:\\tools\\miniforge-\\Library\\bin;C:\\tools\\miniforge-\\Scripts;C:\\Microchip\\SoftConsole-v2021.1\\arm-none-eabi-gcc\\bin;C:\\Program Files\\Conan\\conan;C:\\Users\\My Username\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\My Username\\AppData\\Local\\gitkraken\\bin;C:\\Program Files\\Graphviz\\bin;C:\\tools\\jdk-21.0.1\\bin;C:\\Program Files (x86)\\GnuWin32\\bin;C:\\tools\\bin;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin;C:\\tools\\openocd\\bin;C:\\tools\\gcc-arm-none-eabi\\bin;C:\\Users\\My Username\\AppData\\Roaming\\npm;C:\\Users\\My Username\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\My Username\\AppData\\Local\\Programs\\Microsoft VS Code\\bin",
          "PATH": "C:\\Python311\\Scripts\\;C:\\Python311\\;C:\\Program Files\\Lapce\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\PuTTY\\;C:\\Program Files\\gitui\\bin\\;C:\\Program Files\\LLVM\\bin;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\dotnet\\;C:\\Program Files\\nodejs\\;C:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin\\;C:\\Program Files\\IVI Foundation\\VISA\\Win64\\Bin\\;C:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin;C:\\Program Files\\usbipd-win\\;C:\\Program Files\\TortoiseSVN\\bin;C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit\\;C:\\Program Files\\CMake\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Users\\My Username\\.cargo\\bin;C:\\tools\\miniforge-;C:\\tools\\miniforge-\\Library\\mingw-w64\\bin;C:\\tools\\miniforge-\\Library\\usr\\bin;C:\\tools\\miniforge-\\Library\\bin;C:\\tools\\miniforge-\\Scripts;C:\\Microchip\\SoftConsole-v2021.1\\arm-none-eabi-gcc\\bin;C:\\Program Files\\Conan\\conan;C:\\Users\\My Username\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\My Username\\AppData\\Local\\gitkraken\\bin;C:\\Program Files\\Graphviz\\bin;C:\\tools\\jdk-21.0.1\\bin;C:\\Program Files (x86)\\GnuWin32\\bin;C:\\tools\\bin;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin;C:\\tools\\openocd\\bin;C:\\tools\\gcc-arm-none-eabi\\bin;C:\\Users\\My Username\\AppData\\Roaming\\npm;C:\\Users\\My Username\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\My Username\\AppData\\Local\\Programs\\Microsoft VS Code\\bin"
        }
      },
      "terminal": {
        "defaultProfile": null
      },
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "${nrf-connect.sdk:2.6.1}",
          "toolchain": {
            "path": "${nrf-connect.toolchain:2.6.1}"
          },
          "ozonePath": "",
          "applications": [
            "${workspaceFolder}\\inter_less1_exer1_solution_1",
            "${workspaceFolder}\\inter_less2_exer1",
            "${workspaceFolder}\\inter_less2_exer2",
            "${workspaceFolder}\\inter_less2_exer3",
            "${workspaceFolder}\\hello_world",
            "${workspaceFolder}\\inter_less2_exer1_solution"
          ],
          "applicationOptions": {},
          "kconfig": {
            "interface": "kconfig"
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [
            "${workspaceFolder}\\my_boards"
          ],
          "taskBindings": {},
          "buildTerminal": {
            "condensedProgress": true
          },
          "debugging": {
            "flash": true,
            "bindings": {},
            "justMyCode": true
          },
          "activeAppFollowActiveEditor": true,
          "deviceProvider": "nrfutil",
          "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": "2024.9.87",
            "path": "c:\\Users\\My Username\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2024.9.87-win32-x64",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": {
            "version": "2024.9.14",
            "path": "c:\\Users\\My Username\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2024.9.14",
            "isActive": true
          },
          "nordic-semiconductor.nrf-devicetree": {
            "version": "2024.9.26",
            "path": "c:\\Users\\My Username\\.vscode\\extensions\\nordic-semiconductor.nrf-devicetree-2024.9.26",
            "isActive": true
          },
          "nordic-semiconductor.nrf-kconfig": {
            "version": "2024.9.20",
            "path": "c:\\Users\\My Username\\.vscode\\extensions\\nordic-semiconductor.nrf-kconfig-2024.9.20",
            "isActive": true
          }
        },
        "external": {
          "marus25.cortex-debug": null,
          "ms-vscode.cpptools": "1.21.6",
          "ms-vscode.js-debug": "1.94.0",
          "ms-vscode.js-debug-companion": "1.1.3",
          "ms-vscode.vscode-js-profile-table": "1.0.10",
          "trond-snekvik.gnu-mapfiles": "1.1.0",
          "twxs.cmake": "0.0.17"
        }
      }
    }
    
    

  • Did you create a build configuration and Select Optimize for debugging in the Optimization menu and build configuration?

  • At home I continued to experiment.

    I did a comparison of support information and based on that I started to downgrade or destroy the setup at home.

    I noticed that at home pc where works, I had in the "tools" the JLink.exe 7.94j. I remember that when I install nRF Connect for VSCode from scratch, it installs JLink.exe 7.94e . Therefore in the workplace's PC I do have only 7.94e installed.

    Somehow looks like at home PC I had 7.94e and also 7.94j. Therefore I uninstalled 7.94j and after this I could not debug at all, still was able to flash. (of course always regenerated the build configurations when I did a change). This is somewhat worst than at work.

    After I re-installed (back) the 7.94j at home, again nRF Debug it started to work correctly.

    I also tried to change the deviceProvider and works with both nrfjprog por nrfutil.

    Other difference would be that at home where it works my Home Folder name doesn't have space character. I would be so sad that the username in my workplace computer completely renders useless this plugin. 

    Remain that tomorrow I will install also JLink 7.94j just I have at home. And if still doesn't work, remain this folder name with space.

  • Now I tried to install JLink 7.94j beside 7.94e as it is my pc at home where threads view is working.

    Unfortunately in this PC in my office doesn't work.

    I checked the developer logs in extension host and I see this

    [error] CodeExpectedError: stackTrace: property 'threadId' is invalid.
        at ZKe.Q (vscode-file://vscode-app/c:/Users/My%20Username/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2154:15459)
        at vscode-file://vscode-app/c:/Users/My%20Username/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2154:15037
    I have no idea how it could relate this error to the thread viewer.. maybe not related.

    If you know some flags to enable more debug logs, just tell me.

Related