You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add Go AppHost editor support and debugger readiness coverage - #21826
Adds Go AppHost resource parsing for CodeLens and gutter indicators, and offers the existing debugger setup flow before debugging a Go, Java, or Rust AppHost with missing debugger extensions. Selecting Set Up or dismissing the prompt cancels this launch without a duplicate launch-failure notification/history entry. Run Without Debugging remains available.
Nested and parenthesized Go resource expressions retain their declaration's CodeLens/gutter anchor. The README documents that golang.go's toolchain settings govern the debugger, while Aspire CLI resolves Go from its environment.
Adds Go AppHost-and-resource source-breakpoint coverage to the existing resource-debug E2E shard. Generated AppHosts require Go 1.26, but the old Delve v1.25.2 rejects that toolchain. Provisioning now selects Go 1.26.10 and Delve v1.27.2 without disabling compatibility checks or changing action pins. Go code-generation changes select extension E2E through both affected-project and path-fallback routing.
Relates to #21201, #21213, #21114, and #21115. Builds on already-merged #21187 and #18602. #21211 remains open for live restart validation; restart lifecycle/policy changes are intentionally deferred.
Validation
Latest head ccded4f4cf: actual CI logs inspected, not just job conclusions.
Scenario
Linux
Windows
Public Debug-command dismissal of missing Go debugger; no duplicate error, session/process, pending launch, or installer invocation
All four E2E jobs had an empty advisory-issue setting; these were not masked failures. Both resource-debug shards also cover existing Go resource attach/Run Without Debugging attach behavior. The prior 6be2b99a45 Go breakpoint scenario also passed on Linux and Windows. These results supersede the original unverified-breakpoint statement.
The first dismissal E2E revision passed its new scenario on both platforms but failed the next existing multi-root scenario: deleting the temporary Go fixture left its repository selection stale. ccded4f4cf refreshes discovery and waits for the primary selection during teardown. Latest-head CI above confirms both consecutive scenarios pass.
First added failing regressions reproducing both reviewer findings (nested calls anchored to line 0; setup/dismissal produced StartDebuggingDeclined). After fixes, these commands passed from extension:
The focused suite passed 833 tests / 2 pending. It covers the registered public Debug-command callback through the real tree, launch service, and resolver for setup and dismissal, with substituted language-extension lookup, notifications, debugger start, and installer. Assertions cover cancellation telemetry, no duplicate notification/failure-history entry, cleared state, and preserved genuine declined-launch errors after cancellation/token reuse. Parser/lens/gutter coverage includes nested/parenthesized calls and indexed receivers. Bundling passed with the same four pre-existing webpack dependency warnings.
For the fixture-cleanup revision, compile-tests and lint passed again; this command passed 463 tests / 2 pending:
Earlier failures disclosed: initial Windows CI on 4285826199 had 4149 passing / 9 pending / 2 failing global fake-timer-count assertions in unchanged POSIX cleanup tests. An independently initiated same-head rerun passed 4151 / 9 pending; latest-head CI also passes all 4151. No process-lifecycle/timer-policy changes were made. A full local Windows corepack yarn unit-test --timeout 120000 had 4149 passing / 9 pending / 2 failing unchanged download-cache file-identity/symlink timestamp assertions; it is not claimed green.
The focused commands passed 392 and 318 tests respectively. The second initially had 317 passing / 1 timeout at the default 20-second budget; the explicit slow-host budget passed all 318. Schema generation passed with the current source-built CLI and pinned SDK; unrelated generated drift is excluded.
CLI build passed with a NU1903 advisory for the pinned ILCompiler dependency; real-map tests passed 175/175; whitespace checks passed. A broader selector namespace run was not green: 355 passed / 22 failed, including Windows selecting WSL's shim with no /bin/bash and access-denied temporary Git cleanup. The comparison-base script/tests are unchanged from origin/main, and direct execution of the system Bash shim reproduces the missing-shell error.
An isolated Docker control with Go 1.26.10 reproduced the old Delve compatibility failure, then installed v1.27.2 and hit a real main.main source breakpoint.
Remaining live limitations: actual Marketplace installation, missing-Delve UX, and toolbar/keybinding restart across adapters. Successful setup uses a substituted installer in integration coverage rather than contacting Marketplace from offline E2E. No local interactive Go session/screenshots were captured. The installed old Aspire CLI was not used as current-product evidence. Adjacent Python classification, Node/Bun/Deno display-name localization, and download-cache behavior remain outside this PR. Mitch's approved, explicitly non-blocking tree-sitter-go suggestion is a separate follow-up; this PR does not replace its parser or modify dependency manifests for that exploration.
Screenshots / Recordings
This PR includes UI changes. Please add screenshots or screen recordings so reviewers can evaluate the visual changes without running locally.
For before/after comparisons, place them side-by-side or label them clearly.
For interactive changes (animations, transitions, new flows), prefer a short screen recording (GIF or video).
If you cannot capture visuals now, note what scenario to test and mark this section as TODO.
TODO: capture Go resource CodeLens/gutter indicators and the missing-debugger Set Up prompt. Real Linux/Windows CI verifies breakpoints, running CodeLens, and prompt dismissal, but no local interactive screenshot was captured.
Checklist
Is this feature complete?
Yes. Ready to ship.
No. Follow-up changes expected.
Are you including unit tests for the changes and scenario tests if relevant?
Yes
No
Did you add public API?
Yes
If yes, did you have an API Review for it?
Yes
No
Did you add <remarks /> and <code /> elements on your triple slash comments?
Yes
No
No
Does the change make any security assumptions or guarantees?
Yes
If yes, have you done a threat model and had a security review?
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The Debug setup flow misreports intentional cancellation as a launch failure with a duplicate error, while nested Go resource declarations can place CodeLens actions above package main.
Adds Go AppHost editor support and debugger-readiness checks to the Aspire VS Code extension, building on the existing Go launch and resource-debugging implementations.
Changes:
Adds Go resource parsing for CodeLens and gutter state indicators.
Offers debugger setup before debugging Go, Java, or Rust AppHosts when required extensions are unavailable, while preserving Run Without Debugging.
Adds Go AppHost/resource breakpoint coverage, updates Go and Delve provisioning, and routes Go code-generation changes to extension E2E tests. Live validation of the new scenario remains outstanding.
The reason will be displayed to describe this comment to others. Learn more.
I reviewed the Go AppHost editor support, debugger setup flow, end-to-end debugging coverage, and CI routing changes.
I agree with the two existing comments about setup cancellation being reported as a launch failure and nested Go expressions putting CodeLens on the wrong line. I didn't find anything else to flag.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Valid multiline Go chains place multiple resources’ CodeLens actions and gutter indicators on the same line because resource ranges use selector-dot positions rather than method-token positions.
For a valid multiline Go chain such as db := builder.AddPostgres("pg"). followed by AddDatabase("db"), both selector dots are on the first line. AspireCodeLensProvider uses range.start.line to separate resources sharing a statement, so both resources' state/action lenses stack above AddPostgres, and the database gutter indicator is also placed on that line. Use the method token's position when the selector crosses a newline, and add a multiline multi-resource regression case.
Updated the VS Code extension page: CodeLens now covers Go AppHosts, and documented the missing-debugger setup prompt for Go/Java/Rust AppHosts. Triggered signal: pr_body_has_cli_flag_mention (PR body).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds Go AppHost resource parsing for CodeLens and gutter indicators, and offers the existing debugger setup flow before debugging a Go, Java, or Rust AppHost with missing debugger extensions. Selecting Set Up or dismissing the prompt cancels this launch without a duplicate launch-failure notification/history entry. Run Without Debugging remains available.
Nested and parenthesized Go resource expressions retain their declaration's CodeLens/gutter anchor. The README documents that golang.go's toolchain settings govern the debugger, while Aspire CLI resolves Go from its environment.
Adds Go AppHost-and-resource source-breakpoint coverage to the existing resource-debug E2E shard. Generated AppHosts require Go 1.26, but the old Delve v1.25.2 rejects that toolchain. Provisioning now selects Go 1.26.10 and Delve v1.27.2 without disabling compatibility checks or changing action pins. Go code-generation changes select extension E2E through both affected-project and path-fallback routing.
Relates to #21201, #21213, #21114, and #21115. Builds on already-merged #21187 and #18602. #21211 remains open for live restart validation; restart lifecycle/policy changes are intentionally deferred.
Validation
Latest head
ccded4f4cf: actual CI logs inspected, not just job conclusions.All four E2E jobs had an empty advisory-issue setting; these were not masked failures. Both resource-debug shards also cover existing Go resource attach/Run Without Debugging attach behavior. The prior
6be2b99a45Go breakpoint scenario also passed on Linux and Windows. These results supersede the original unverified-breakpoint statement.The first dismissal E2E revision passed its new scenario on both platforms but failed the next existing multi-root scenario: deleting the temporary Go fixture left its repository selection stale.
ccded4f4cfrefreshes discovery and waits for the primary selection during teardown. Latest-head CI above confirms both consecutive scenarios pass.First added failing regressions reproducing both reviewer findings (nested calls anchored to line 0; setup/dismissal produced
StartDebuggingDeclined). After fixes, these commands passed fromextension:The focused suite passed 833 tests / 2 pending. It covers the registered public Debug-command callback through the real tree, launch service, and resolver for setup and dismissal, with substituted language-extension lookup, notifications, debugger start, and installer. Assertions cover cancellation telemetry, no duplicate notification/failure-history entry, cleared state, and preserved genuine declined-launch errors after cancellation/token reuse. Parser/lens/gutter coverage includes nested/parenthesized calls and indexed receivers. Bundling passed with the same four pre-existing webpack dependency warnings.
For the fixture-cleanup revision, compile-tests and lint passed again; this command passed 463 tests / 2 pending:
Earlier failures disclosed: initial Windows CI on
4285826199had 4149 passing / 9 pending / 2 failing global fake-timer-count assertions in unchanged POSIX cleanup tests. An independently initiated same-head rerun passed 4151 / 9 pending; latest-head CI also passes all 4151. No process-lifecycle/timer-policy changes were made. A full local Windowscorepack yarn unit-test --timeout 120000had 4149 passing / 9 pending / 2 failing unchanged download-cache file-identity/symlink timestamp assertions; it is not claimed green.Earlier extension commands also passed:
The focused commands passed 392 and 318 tests respectively. The second initially had 317 passing / 1 timeout at the default 20-second budget; the explicit slow-host budget passed all 318. Schema generation passed with the current source-built CLI and pinned SDK; unrelated generated drift is excluded.
Repository-root commands:
CLI build passed with a NU1903 advisory for the pinned ILCompiler dependency; real-map tests passed 175/175; whitespace checks passed. A broader selector namespace run was not green: 355 passed / 22 failed, including Windows selecting WSL's shim with no
/bin/bashand access-denied temporary Git cleanup. The comparison-base script/tests are unchanged fromorigin/main, and direct execution of the system Bash shim reproduces the missing-shell error.An isolated Docker control with Go 1.26.10 reproduced the old Delve compatibility failure, then installed v1.27.2 and hit a real
main.mainsource breakpoint.Remaining live limitations: actual Marketplace installation, missing-Delve UX, and toolbar/keybinding restart across adapters. Successful setup uses a substituted installer in integration coverage rather than contacting Marketplace from offline E2E. No local interactive Go session/screenshots were captured. The installed old Aspire CLI was not used as current-product evidence. Adjacent Python classification, Node/Bun/Deno display-name localization, and download-cache behavior remain outside this PR. Mitch's approved, explicitly non-blocking tree-sitter-go suggestion is a separate follow-up; this PR does not replace its parser or modify dependency manifests for that exploration.
Screenshots / Recordings
TODO: capture Go resource CodeLens/gutter indicators and the missing-debugger Set Up prompt. Real Linux/Windows CI verifies breakpoints, running CodeLens, and prompt dismissal, but no local interactive screenshot was captured.
Checklist
<remarks />and<code />elements on your triple slash comments?