VSCode + codeLLDB + mac M2 error: the platform is not currently connected

439 Views Asked by At

I am able to run lldb directly from the terminal, but VSCode debug mode raises an error

My config is

Version: 1.79.1 (Universal)
Commit: 4cb974a7aed77a74c7813bdccd99ee0d04901215
Date: 2023-06-12T16:16:49.215Z (2 days ago)
Electron: 22.5.7
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Darwin arm64 22.5.0
$ lldb --version
lldb-1403.0.17.67
Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100)

https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb v1.9.2

I have looked at some lldb x Mac related post (like https://github.com/vadimcn/codelldb/issues/411) but since I'm able to run it from the terminal and not from VSCode, I don't really see how to apply these solutions.

VSCode error message

2

There are 2 best solutions below

0
timvinc On

I hope you've solved your problem. I ran into what I think is the same issue after upgrading to an M3 MacBook Pro, and what solved my problem was deleting the extensions directory at ~/.vscode/extensions (or ~/.vscode-insiders/extensions if you use the insiders version), and reinstalling my desired extensions. I believe there was an architecture mismatch. You could probably do this more precisely by reinstalling individual extensions that you suspect are causing the problem.

This is the answer on a separate issue that helped me: https://stackoverflow.com/a/77250800

0
nikolay-pv On

Calling Developer: Reinstall extension... from the VSCode's Command Palette for the 'lldb related' extension (CodeLLDB for me) will solve the issue.