microsoft / microsoft/vscode-containers

Debug error at start session: "Variable ${workspaceFolder} can not be resolved in a multi folder workspace. Scope this variable using ':' and a workspace folder name"

Open
#103 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

.NET
Dominant language
TypeScript
Stars
139
Forks
87
Avg merge
9h 15m
Merged PRs (30d)
9

Description

Workspace file contains:

{
  "folders": [
    { "path": "." },
    { "path": "../some-folder" }
  ],
  "extensions": {
    "recommendations": [
      "ms-dotnettools.csdevkit",
      "csharpier.csharpier-vscode"
    ]
  },
  "settings": { ... },
  "launch": {
    "version": "0.2.0",
    "configurations": [
      {
        "name": "SomeService (docker attach)",
        "type": "docker",
        "request": "attach",
        "platform": "netCore",
        "containerName": "some-service",
        "processName": "Some.Service.Host",
        "sourceFileMap": {
          "/": "~",
        }
      },
      ...
    ]
  }
}

Expected the debug session to start without errors.

Source of issue:
https://github.com/microsoft/vscode-docker/blob/v1.29.2/src/debugging/netcore/NetCoreDebugHelper.ts#L175

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/debugging/netcore/NetCoreDebugHelper.ts around line 175 and inspect how ${workspaceFolder} is resolved for the reported multi-folder workspace. Reproduce the Docker attach configuration and verify that the debug session starts without the variable-resolution error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, typescript, vscode
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.