microsoft / microsoft/vscode-cmake-tools
Removal of vscode-cmake-tool custom debug buttons/functionality
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
### Brief Issue Summary
The CMake extension supports a custom debug or launch experience. But the experience creates a huge cognitive dissonance for how debugging/launching works for other programming languages and extensions in VS Code.
VS Code has a very specific way to configure launch/debugging via a `launch.json`. This is readily explained here https://code.visualstudio.com/docs/editor/debugging. As can be seen, it has its own **Run and Debug** icon in the activity bar.
VS Code by default also comes with the very common/default keyboard shortcuts F5 to start debugging, or Ctrl+F5 to run without debugging (launch).
## Problems
There are multiple problems with the approach this extension has taken with a custom launch/debugging experience.
### It is not visible in the _Run and Debug_ view
Notice how the CMake extensions' custom debug options are not visible here. Only the ones from `launch.json` are:

### The **Status Bar** shows double launch/debug buttons
A) is the default VS Code debugging/launch experience
B) Is the custom buttons add by the CMake extension
This "double the amount of buttons" is confusing.

### The default debugging keyboard shortcut is overriden by the CMake extension
A) is the default VS Code keyboard shortcuts that launches the debug config selected in the **Run and Debug** view
b) Is the CMake extension that actually overrides the "without debugging" part for Ctrl+F5, which is a very bad user experience.

### Hides implementation details
The custom CMake extension debugging hides all launch/debug details, and does not allow for users to easily set new options/overrides as can be done in `launch.json`, so everything is a bit of magic.
## Solution
I strongly believe all this custom debug (status bar icons, keyboard shortcuts) etc should be removed. And that VS Code's builtin **Run and Debug** view/support should be used. This creates less information for users to learn since most are accustomed to other ways with other extensions and programming languages.
Instead all meny options such as `CMake: Debug` and `CMake: Run Without Debugging` should create default entries in `launch.json` when invoked if none exists. It simplifies a lot for users.
## Additional references
https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/debug-launch.md
https://code.visualstudio.com/updates/v1_94#_start-debugging-from-chat-experimental (might not work properly with the custom debug experience)
Contributor guide
Research direction
Start with docs/debug-launch.md and review the CMake: Debug and CMake: Run Without Debugging entry points alongside VS Code's launch.json behavior. Identify the custom status-bar buttons and keyboard shortcuts involved, then define completion as using the built-in Run and Debug flow without duplicate controls or overridden shortcuts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, typescript
- Domain
- developer-experience, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100