microsoft / microsoft/vscode-cmake-tools
vscode-cmake-tools default debugger config `cmake.debugConfig` unable to adapt GDB and lldb simultaneously
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
vscode-cmake-tools has its own debugging configuration in settings.json. When we click the debugging button in the status bar, if we configure our own configuration in settings.json, it will enable our own configuration instead of the default configuration.
Meanwhile, VSCode will determine which debugger to start based on the currently selected compiler. GCC will start GDB, while Clang will start lldb mi or lldb.
Sometimes it may be necessary to configure different startup commands for different debuggers, which can result in the command of another debugger in the configuration not being executed correctly after switching the debuggers, and thus unable to start the debuggers.
for example, cmake.debugConfig in settings.json for lldb:
{
"cmake.debugConfig": {
"setupCommands": [
{
"text": "settings set target.disable-aslr false",
}
],
},
}
Due to the inability to configure for different debuggers, switching the debugger to GDB, click the debugging button in the status bar:
vscode report:
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 in settings.json is consumed when the status-bar debugging button launches VS Code's selected debugger. Compare the GDB and lldb startup paths and determine how debugger-specific commands should be selected. Done means switching between GCC/GDB and Clang/lldb starts each debugger without executing incompatible setup commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, typescript, vscode
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100