Fix VS Code debug startup with older Aspire CLI - #19447
Fix VS Code debug startup with older Aspire CLI#19447Ella Hathaway (ellahathaway) wants to merge 1 commit into
Conversation
Configure both current and legacy Aspire CLI startup timeouts for extension-managed debug launches while preserving explicit overrides. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e2652344-3792-442b-885f-f3cddca21a0e
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19447Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19447" |
Tests selector (audit mode)The full test matrix and all jobs still run in audit mode. The tests and jobs below are what selective CI would run under enforcement. 0 / 101 test projects · 2 jobs, from 8 changed files. Selected test projects (0 / 101)none — no .NET test projects run for this change. Selected jobs (2)
How these were chosen — grouped by what changedJob reasons
Selection computed for commit |
There was a problem hiding this comment.
Pull request overview
Ensures VS Code debug sessions remain compatible with older Aspire CLIs by propagating the effective startup timeout to the legacy backchannel timeout.
Changes:
- Adds legacy timeout configuration after launch-environment merging.
- Preserves explicit and case-insensitive Windows overrides.
- Adds unit and E2E regression coverage for delayed startup.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
extension/src/utils/process/cliProcess.ts |
Configures and logs both timeout values. |
extension/src/utils/environment.ts |
Centralizes debug timeout derivation. |
extension/src/utils/AspireTerminalProvider.ts |
Defers timeout defaults where launch overrides apply. |
extension/src/test/cliSpawn.test.ts |
Tests timeout merging and diagnostics. |
extension/src/test/aspireTerminalProvider.test.ts |
Tests defaults and explicit overrides. |
extension/src/test-e2e/helpers/fixtures.ts |
Adds a legacy-timeout CLI wrapper. |
extension/src/test-e2e/debugStartupTimeout.e2e.test.ts |
Verifies startup beyond 60 seconds. |
extension/scripts/run-e2e.js |
Supports older SDK fixtures and workspace URI launching. |
| test('derives the legacy backchannel timeout after merging the launch environment', () => { | ||
| const childProcess = createTestChildProcess(4646); | ||
| const spawnStub = sinon.stub(nodeChildProcess, 'spawn').returns(childProcess); | ||
| const terminalProvider = { createEnvironment: () => ({}) } as AspireTerminalProvider; |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Description
VS Code debug launches can fail with
Hosting failed to startwhen a newer Aspire extension invokes Aspire CLI 13.3.5 and AppHost startup takes longer than 60 seconds. That CLI reads the legacyASPIRE_CLI_BACKCHANNEL_CONNECT_TIMEOUT_SECONDSsetting and does not use the newer startup timeout for its backchannel deadline.This change makes extension-managed debug launches provide both the current and legacy timeout settings from the effective startup timeout after launch environment overrides are merged. Explicit values remain authoritative, including differently cased environment keys on Windows, and the existing redacted spawn diagnostic now reports both effective timeout values. Run-without-debugging and ordinary terminal launches remain unchanged.
User-facing usage
No configuration is required. Debugging an Aspire app in VS Code can now tolerate AppHost startup beyond the legacy 60-second backchannel deadline when an older CLI is on
PATH.Validation
Fixes #17354
Checklist
<remarks />and<code />elements on your triple slash comments?