Skip to content

VS Code launch.json Variable substitution in name does not work #251801

Closed as not planned
@rumgot

Description

@rumgot

Type: Bug

  • VS Code Version: 1.101.0
  • OS Name: Microsoft Windows 11 Pro
  • OS Version: 10.0.26100 N/A Build 26100

I want to use the variable ${workspaceFolderBasename} or another similar one, for example ${command:cmake.launchTargetFilename} as a value for the name field in launch.json, so that I can see the corresponding name in the Run and Debug menu. However, in the menu I see this string as a name:
${workspaceFolderBasename}
or
${command:cmake.launchTargetFilename}

i.e. substitution of values ​​does not work.

However, substitution of these variables in the same file works for me for other purposes (for example, passing their values ​​as environment variables for the launched process).

VS Code version: Code 1.101.0 (dfaf441, 2025-06-11T15:00:50.123Z)
OS version: Windows_NT x64 10.0.26100
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (8 x 2803)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.73GB (19.13GB free)
Process Argv --crash-reporter-id b8189d56-29c0-4a25-a04d-215715cd2080
Screen Reader no
VM 0%
Extensions (20)
Extension Author (truncated) Version
Bookmarks ale 13.5.0
amazon-q-vscode ama 1.76.0
vscode-language-pack-ru MS- 1.101.2025061109
debugpy ms- 2025.8.0
python ms- 2025.8.0
vscode-pylance ms- 2025.6.1
cmake-tools ms- 1.20.53
cpptools ms- 1.25.3
cpptools-extension-pack ms- 1.3.1
hexeditor ms- 1.11.1
live-server ms- 0.4.15
powershell ms- 2025.0.0
wasm-dwarf-debugging ms- 1.0.1
qt the 1.2.0
qt-core the 1.4.0
qt-cpp the 1.4.0
qt-cpp-pack the 1.0.1
qt-qml the 1.5.1
qt-ui the 1.4.0
qt-wasm-pack the 1.0.1

(2 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
pythonrstrctxt:31112756
nativeloc2:31192216
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31222730
e5gg6876:31282496
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
c7cif404:31314491
pythonpulldiag:31325930
996jf627:31283433
pythonrdcb7cf:31303019
usemplatestapi:31297334
0aa6g176:31307128
7bj51361:31289155
747dc170:31275177
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
pylancequickfixf:31329273
jhi8h917:31327034
d7aab740:31328298
1292j425:31329156
048e0538:31329543

Metadata

Metadata

Assignees

Labels

*as-designedDescribed behavior is as designed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions