Skip to content

Variable substitution in launch.json object keys stopped working in 1.99 #245798

@zobo

Description

@zobo

Does this issue occur when all extensions are disabled?: N/A

Version: 1.99.0 (user setup)
Commit: 4437686
Date: 2025-04-02T21:35:19.530Z
Electron: 34.3.2
ElectronBuildId: 11161073
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100

After upgrading to 1.99 the way variable substitution is performed in launch.json changed. Variables are not resolved anymore in array keys. I'm working with xdebug.php-debug extension.

This is the source launch.json:

    {
      "name": "Listen for Xdebug",
      "type": "php",
      "request": "launch",
      "port": 9003,
      "pathMappings": {
        "${workspaceFolder}": "${workspaceFolder}"
      }
    }

I have verified that this corresponds to what resolveDebugConfiguration sees:

Image

After variable substitution, this is what resolveDebugConfigurationWithSubstitutedVariables and later the debug adapter sees:

    {
      "name": "Listen for Xdebug",
      "type": "php",
      "request": "launch",
      "port": 9003,
      "pathMappings": {
        "${workspaceFolder}": "C:\\workspace_folder\\..."
      }
    }

Image

In previous version, 1.98.2, both the pathMappings object key and value got replaced.

Previous version Version: 1.98.2 (user setup) Commit: ddc367e Date: 2025-03-12T13:32:45.399Z Electron: 34.2.0 ElectronBuildId: 11161602 Chromium: 132.0.6834.196 Node.js: 20.18.2 V8: 13.2.152.36-electron.0 OS: Windows_NT x64 10.0.26100

Labels: new release, debugger

Ref: xdebug/vscode-php-debug#1004

Metadata

Metadata

Assignees

Labels

author-verification-requestedIssues potentially verifiable by issue authorbugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions