.NET Docker launch schema rejects args and sourceFileMap used by the debug resolver

Aperta Adatta ai principianti
#655 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
docker, typescript, vscode
Ambito
devtools, testing

Direzione di ricerca

L’issue individua lo schema di avvio e il resolver .NET in extensions/vscode-containers/src/debugging/netcore/NetCoreDebugHelper.ts; individua lo schema di avvio e i relativi test di validazione. Leggi come il resolver gestisce args e sourceFileMap, quindi aggiungi le definizioni allo schema e i test per entrambe le proprietà. Il lavoro è completato quando la configurazione di esempio non produce avvisi dello schema e i test di validazione passano.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

Container Tools reports these warnings for a Docker .NET launch configuration:

  • Property args is not allowed.
  • Property sourceFileMap is not allowed.

However, the .NET launch resolver explicitly reads both properties and forwards them to the resolved coreclr configuration.

Environment

  • Container Tools: ms-azuretools.vscode-containers 2.5.3
  • VS Code: 1.109.4, x64
  • Windows, build 26200
  • Debugging .NET 9 in Linux containers

Steps to reproduce

  1. Install Container Tools and open a folder in VS Code.
  2. Add the following to .vscode/launch.json.
  3. Open the Problems panel.
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Example .NET container",
      "type": "docker",
      "request": "launch",
      "platform": "netCore",
      "containerName": "example-app",
      "netCore": {
        "appProject": "${workspaceFolder}\\ExampleApp.csproj"
      },
      "args": ["/app/ExampleApp.dll"],
      "sourceFileMap": {
        "/src": "${workspaceFolder}"
      }
    }
  ]
}

Both properties are flagged without starting a debug session. Two configurations produce four warnings.

This example reproduces schema diagnostics only; actually launching requires a project and configured container.

Expected behavior

The launch schema should accept and describe these properties if they are supported overrides.

Actual behavior and evidence

The launch schema omits both properties. The attach schema includes sourceFileMap. The omission is also present on main at commit 4bb819ccbf71cdf3eb3a4b36493987caabb60572 (manifest version 2.5.4-alpha).

In the 2.5.3 launch resolver, line 120 reads debugConfiguration.args, and line 136 reads debugConfiguration.sourceFileMap.

In a working container setup, these overrides select the mounted application DLL and map portable PDB source paths back to the workspace. Debugging works, but the schema warnings remain.

Requested change

Align the Docker .NET launch schema with the resolver, adding appropriate definitions and validation coverage for args and sourceFileMap. If these overrides are intentionally unsupported, please clarify the supported alternative.

Lingua principale
TypeScript
Stelle
147
Fork
93
Merge medio
9h 16m
PR unite (30g)
14

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/vscode-containers

Tutte le issue di microsoft/vscode-containers

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.