Description
Especially on older Macs with an Intel chip or following an update, debugging in VS Code with CodeLLDB fails.
Evidently, the crux of the issue is that CodeLLDB includes a bundled debugserver
, which is incompatible (or becomes incompatible after an update). vadimcn/codelldb#999
A potential fix is to delete that bundled file. Removing it results in fallback to a system version that works.
cd ~/.vscode/extensions/vadimcn.vscode-lldb-1.10.0/lldb/bin
rm debugserver
See vadimcn/codelldb#456 (reply in thread).
We should probably add this to the troubleshooting section.
- Description of the problem (attempt to launch the debugger, it thinks a minute, then nothing happens... is that accurate?)
- Recommended workaround (deleting
debugserver
). What's the best procedure for having students do this? (Possibly something like "open extensions folder" from the VS code command palette, then navigate to most recent codelldb, go to lldb/bin and delete it?) - How to verify it has fixed or how to undo? (I'm not sure this is necessary, if it was already broken.)
A prerequisite for this workaround is students having CLI tools installed via xcode-select --install
, but we already have them do that. (Otherwise there wouldn't be a separate debugserver to fall back on.)
I'll also note that the issue that prompted the most recent switch to CodeLLDB rather than the microsoft C++ debugging extension is unfortunately still unresolved. Otherwise, we could consider not recommending CodeLLDB anymore.
microsoft/vscode-cpptools#7240