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). https://github.com/vadimcn/codelldb/issues/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
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.
https://github.com/microsoft/vscode-cpptools/issues/7240
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). https://github.com/vadimcn/codelldb/issues/999A potential fix is to delete that bundled file. Removing it results in fallback to a system version that works.
See https://github.com/vadimcn/codelldb/discussions/456#discussioncomment-874122.
We should probably add this to the troubleshooting section.
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?)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. https://github.com/microsoft/vscode-cpptools/issues/7240