Add env support to Aspire debug launch configuration#16449
Add env support to Aspire debug launch configuration#16449adamint merged 1 commit intomicrosoft:mainfrom
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16449Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16449" |
There was a problem hiding this comment.
Pull request overview
This PR updates the Aspire VS Code extension’s debug launch configuration schema to officially support env and args, and wires env into the Aspire CLI process spawn so existing launch.json settings are recognized and applied without VS Code schema warnings.
Changes:
- Add
args(string array) andenv(string-valued object) to theaspiredebugger launch schema (including localization strings). - Pass
envfrom the debug configuration into the CLI spawn options when launching an AppHost. - Extend/adjust tests to validate schema entries and use platform-correct absolute paths for working directory tests.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| extension/src/test/packageManifest.test.ts | Adds manifest coverage tests asserting args and env are declared correctly in the debugger schema. |
| extension/src/test/launchProfiles.test.ts | Updates working-directory tests to use platform-correct absolute paths instead of hardcoded Windows paths. |
| extension/src/debugger/AspireDebugSession.ts | Converts debug configuration env to EnvVar[] and passes it to spawnCliProcess. |
| extension/src/dcp/types.ts | Extends AspireExtendedDebugConfiguration with an optional env property. |
| extension/package.nls.json | Adds localized strings for the new args and env schema descriptions. |
| extension/package.json | Declares args and env in contributes.debuggers[].configurationAttributes.launch.properties. |
| extension/loc/xlf/aspire-vscode.xlf | Adds localization entries for the new debug configuration strings. |
|
Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
|
Description
Adds launch configuration schema support for
envandargson Aspire debug configurations so VS Code recognizes the existing launch settings without warnings.The
envconfiguration is now wired into the Aspire CLI spawn options when launching an AppHost. The existingargssetting is also declared in the schema. This change includes package manifest coverage for both schema entries and fixes the related launch profile working-directory tests to use platform-correct absolute paths.Validation:
cd extension && npx tsc --noEmit -p tsconfig.jsoncd extension && npm run compile-testscd extension && npm run lintcd extension && npm test(324 passing)Fixes #16445
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: