microsoft / microsoft/vscode-cmake-tools

Removal of vscode-cmake-tool custom debug buttons/functionality

Open
#4,061 7 comments 5 reactions 0 assignees View on GitHub
enhancement Feature: debug/launch
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:

![image](https://github.com/user-attachments/assets/d694f590-ac7a-41bf-a3f6-c610e37c2023)

### 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.

![image](https://github.com/user-attachments/assets/24489935-5622-496d-9a1e-1ee2b2b987a4)

### 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.

![image](https://github.com/user-attachments/assets/1fa31e35-2d61-44a6-8c37-7e2577fe8ddb)

### 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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.