Skip to content

Add cmake.launchConfig setting for customizable run configurations#4916

Draft
hanniavalera wants to merge 1 commit intomainfrom
dev/hanniavalera/embeddedDbug
Draft

Add cmake.launchConfig setting for customizable run configurations#4916
hanniavalera wants to merge 1 commit intomainfrom
dev/hanniavalera/embeddedDbug

Conversation

@hanniavalera
Copy link
Copy Markdown
Contributor

This pull request introduces a major new feature to VS Code CMake Tools: the ability to customize the "Run Without Debugging" command via a new cmake.launchConfig setting. This allows users to delegate launching to a VS Code task or to run a custom program (such as a firmware flashing tool), with support for argument, environment, and working directory customization. The implementation includes schema, documentation, and UI/logic changes, as well as telemetry and user guidance for the new behavior. Suggested by @positron96 and addresses #4904

Key changes include:

New Feature: Customizable Run Without Debugging

  • Added the cmake.launchConfig setting, allowing users to configure "Run Without Debugging" to either delegate to a VS Code task (task) or run a custom program (program). This supports variable substitution and custom arguments, environment, and working directory. [1] [2] [3] [4]

Core Implementation and Lifecycle Management

  • Implemented logic in CMakeProject to handle the new launch modes, including running a VS Code task or a custom program instead of the default executable, with proper terminal/task lifecycle and cleanup. [1] [2] [3] [4] [5]
  • Added telemetry event logging to track usage of the new launch modes.

Configuration and API Updates

  • Extended the configuration schema and settings interface to support the new launchConfig property and expose it through the configuration reader. [1] [2] [3]

User Guidance and Documentation

  • Updated documentation and settings descriptions, including warnings when both cmake.launchConfig and cmake.debugConfig fields are set (as the latter are ignored for the launch path), and improved error/warning messages for ambiguous or missing tasks. [1] [2]

These changes provide advanced users and embedded developers with much more flexibility for customizing their build/run workflows directly from CMake Tools.

- Introduced `cmake.launchConfig` to allow users to customize the "Run Without Debugging" command, enabling delegation to a VS Code task or a custom program.
- Updated documentation and changelog to reflect this new feature.
- Added unit tests to ensure correct functionality and regression coverage for the new launch configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Make "Run without debuggnig" configurable (for embedded dev)

1 participant