microsoft / microsoft/vscode-cmake-tools
No installed `lldb` debugger is automatically discovered on newer macOS versions
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
On newer versions of macOS and XCode, the `lldb` debugger is not found automatically and neither is the `lldb-mi` that is packaged with the `cpptools` extension.
## lldb
`lldb` isn't found seemingly because it's looked for in the same directory as the compiler, whereas it's actually installed globally, in `/usr/bin`.
## lldb-mi
`lldb-mi` goes undiscovered seemingly because searching for it is predicated on finding `lldb-mi` in the compiler path. `lldb-mi` isn't shipped with XCode, so this check fails. I'm not sure when it would succeed and regardless, it seems strange to be looking for it in one place just to find it in another, but maybe I'm missing something. This check was introduced in #1315, but doesn't provide much context for the change.
The workaround for this is to explicitly set
```json
{
"cmake.debugConfig": {
"MIMode": "lldb"
}
}
```
in `settings.json`, which bypasses the aforementioned check. However, it's not convenient to configure this on every new development setup and adding it to the workspace settings creates problems on other platforms.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how cmake.debugConfig and compiler-path discovery are handled for macOS, using the settings.json workaround as the reported behavior to reproduce. Confirm that installed lldb and lldb-mi are discovered without a workspace override, and add or update tests if the relevant discovery coverage is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100