Debugging Rust in VS Code

I am pretty sure my config used to work just fine. I don’t know with what channel update or possible change to my config I broke debugging in vs-code but I cant anymore.

I tried all methods described here in the wiki Rust - NixOS Wiki. I tried just having rustup and go from there. I tried other shell files nothing seems to work and I am sure this was working about 2 months ago. My current behaviour is this in vs code (llvm and rust-analyzer are installed none show any problems).

  • I start debugging (does not matter if I debug using a specifict test from the file provided by rust-analyzer or use vs code debug profile). Nothing seems to happen.
  • If I start debugging again I will see multiple instances of the debug session popping up in the call stack.
  • all outputs in vscode are empty. I do not get any error messages
  • The only suspicious thing is this. If I start vscode using code --verbose --wait . and run the debugger this error appears in the logs

128462:1207/234339.103723:INFO:CONSOLE(645)] “%c ERR color: #f33 spawn /home//.vscode/extensions/vadimcn.vscode-lldb-1.10.0/adapter/codelldb ENOENT: Error: spawn /home//.vscode/extensions/vadimcn.vscode-lldb-1.10.0/adapter/codelldb ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)”, source: vscode-file://vscode-app/nix/store/h44yybwk50qmdfnf09rwkmapr7x0pjda-vscode-1.84.2/lib/vscode/resources/app/out/vs/workbench/workbench.desktop.main.js (645)

I am completely stuck. I have been trying to figure this out for hours now but I am getting nowhere. I know the problem description could be improved. If you have any remarks or information I could add to find the issue easier please tell me. Would be very happy if someone could help me out here

I’m having the same issue. It seems like it’s not specific to nixos, see this issue. deleting the extension folder and re-installing fixes it for some people, but it didn’t for me

I basically ended up removed vscode alltogether and removing all leftovers in ~/.vscode. After this I reinstalled and it did resolve. However I am still a bit unhappy not knowing what the root cause was