Skip to content

Add command substitution for getLaunchTarget so the current debug target name can be consumed in tasks.json #1895

Description

@hwmaier

This is a feature request.

Currently a list of CMake variables are available for command substitution in task commands, for example cmake.buildTargetName. Refer to https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/cmake-settings.md

While the build target name is exposed as substitution, the corresponding debug target name is not.

It would be beneficial to add a substitution for getLaunchTarget so the current debug target name is also available and can be consumed in tasks. This is very useful to support utility targets like code signing or embedded flash programming.

Please note, the getLaunchTargetFilename (equivalent to CMake API nameOnDisk) is already exposed, but this is a different value than the itself launchTarget (CMake API value name) and has the file extension .exe or .elf appended.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature: debug/launchenhancementan enhancement to the product that is either not present or an improvement to an existing featurehelp wantedwe currently are not planning work on this and would like help from the open source communitystale-exemptto use with close-stale-issues and close-old-issues bot

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions