Repository navigation
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Go source breakpoints never bind when the VS Code workspace is opened through a symlinked path. On macOS that includes /tmp → /private/tmp and /var → /private/var. A symlinked project directory on any OS has the same problem.
The breakpoint stays hollow (unverified). Hovering it shows:
could not find file /tmp/avm/DbgTest/goapi/main.go
The resource keeps serving requests, but the breakpoint is never hit. This affects both Go debugging entry points in the VS Code extension:
- Attach debugger on a running Go resource, from the Aspire view or the
aspire_resource_debuglanguage model tool (Add VS Code resource debugging for .NET and Go #18602). - Debug AppHost (F5) for Go resources launched by the IDE. This path dates back to Add VS Code Go debugging support #17406.
.NET resource breakpoints work in the same workspace.
Root cause
- The CLI and hosting canonicalize the AppHost path, so DCP runs the Go resource (
go run) with working directory/private/tmp/avm/DbgTest/goapi. - The Go compiler records that path in the binary's DWARF. Reading the running resource binary shows
/private/tmp/avm/DbgTest/goapi/main.go. - VS Code sends breakpoints using the workspace path as opened:
/tmp/avm/DbgTest/goapi/main.go. - Neither Go debug configuration maps one path to the other. Delve compares the paths literally and doesn't find the file.
- Attach:
extension/src/debugger/languages/go.ts,createGoAttachDebugConfiguration. It setstype: go,request: attach,mode: local,debugAdapter: dlv-dapandprocessId, but nosubstitutePath. - F5 launch:
createDebugSessionConfigurationCallback. It setsprogramandcwdto the canonical AppHost-relative path, but nosubstitutePath.
- Attach:
Standalone Delve repro with a binary built from /private/tmp/avsym (/tmp/avsym is the same directory through the symlink):
(dlv) break /tmp/avsym/main.go:6
Command failed: location "/tmp/avsym/main.go:6" not found
(dlv) break /private/tmp/avsym/main.go:6
Breakpoint 1 set at 0x100ab7fc8 for main.main() ./main.go:6
After config substitute-path /private/tmp/avsym /tmp/avsym, the /tmp/avsym/main.go:6 breakpoint is set and hit.
Why tests don't catch it: extension/scripts/run-e2e.js resolves the E2E temp root with fs.realpathSync.native (line 92), so E2E workspaces never go through a symlink. Linux CI has no /tmp symlink.
Expected Behavior
Go breakpoints bind and are hit no matter which path to the workspace folder VS Code used, with both Attach debugger and F5, like .NET breakpoints already do.
Possible fix: when a workspace folder's path differs from its real path, add substitutePath entries { from: <workspace path>, to: <real path> } to the Go launch and attach debug configurations. Alternatively, avoid canonicalizing the paths passed to the Go toolchain. Add an E2E case that opens the workspace through a symlink.
Steps To Reproduce
On macOS, with the Aspire VS Code extension, the Go extension (golang.go) and Delve installed:
- Create an Aspire app under
/tmp, for exampleaspire new aspire-starter -o /tmp/avm/DbgTest. - Add a Go resource:
aspire add go. Then addbuilder.AddGoApp("goapi", "../goapi").WithHttpEndpoint(env: "PORT");with a minimalnet/httpserver in/tmp/avm/DbgTest/goapi. - Open the folder through the symlinked path:
code /tmp/avm/DbgTest. - Set a breakpoint inside the Go HTTP handler.
- Either:
- Aspire view → Run AppHost, then right-click the Go resource → Attach debugger; or
- Debug AppHost (F5).
- Request the Go endpoint. The breakpoint stays hollow, shows "could not find file /tmp/…/main.go", and isn't hit.
- Open the same folder as
code /private/tmp/avm/DbgTestand repeat. The breakpoint binds and is hit.
Workaround: open the workspace by its real path.
Exceptions (if any)
None. Delve reports could not find file /tmp/avm/DbgTest/goapi/main.go on the unverified breakpoint.
Aspire doctor output
N/A. The root cause is the Go debug configuration path mapping in the VS Code extension and isn't environment-specific.
Anything else?
- macOS: 27.2.1, arm64.
- VS Code: 1.146.0.
- Aspire extension: v1.26.0, a VSIX built from
main@e870a4c. - Other extensions: Go 0.58.0, C# 2.160.4, C# Dev Kit 3.40.215.
- Aspire CLI and packages: staging
17.0.0+148071e(release/17.0). - Go toolchain: Go 1.27.4, Delve 1.27.2.
Found while testing #18602 and #19414. Related docs issue: microsoft/aspire.dev#2187.
Activity
joperezr commentedon Nov 17, 2026
🤖 Aspire triage pass — 2026-11-17 06:19 UTC
Area:
area-vscode-extensionKind: bug
Repro: partial — see lines 31–40 and 50–64 of the issue body; detailed steps and a debugger transcript are provided, but no complete minimal app is attached and this pass did not reproduce the behavior
Affected version(s): extension
1.26.0, CLI/packages staging17.0.0+148071e— reported in lines 78–83; last working: unknown; latest stable:13.6.5per the repository releases APISeverity: S3 — Go debugging reportedly fails for symlink-opened workspaces; opening the canonical workspace path is a reported workaround (lines 54–64)
Urgency: ⚪ backlog — no milestone
Reason: no verified regression baseline or servicing case; the configured active-release target is unavailable, so no replacement milestone is selected
Suggested owner(s): pending human availability check; evidence leader is davidfowl (score 54), not a confirmed owner
Evidence:
area-vscode-extensionin the last 30 days: Accept relay connection reset when waiting for stalled Blazor WASM bridge close #21963, Accept js-debug target-closed reply to Blazor hosted-global Page.close #21938, Write the WinUI E2E ready marker atomically so the test never reads an empty file #21932, Scope E2E state file bridge fake timers to each test's async context #21927, Fix VS Code E2E folder picker flake after a colliding selection #21926, Scope VS Code extension spawnCli fake timers to the test's async context #21922, Report Java debug startup timeout E2E failures separately from cleanup #21921, Keep the debugger install hint E2E fixture under the run root to fix Windows EBUSY teardown #21918, Fix false positive in resource debug E2E privacy assertion #21915, Wait for e2e-worker's endpoint URL before capturing it in the tree-actions E2E #21914, Give the VS Code extension's aspire --version probe a 30s budget #21912, Wait for resource lifecycle command outcomes instead of the 10s E2E control apply timeout #21643, Wait for C# project initialization before coordinated-build E2E fixtures #21640, Wait for the settings command outcome instead of the 10s E2E control apply timeout #21636, Fail fast when a VS Code E2E AppHost debug session ends before startup #21629, Give the Deno AppHost inspector attach the AppHost startup budget #21604, Accept natural ps leader exit racing a failed Windows taskkill (Fixes #20869) #21595, Dismiss VS Code E2E notifications without depending on hover #21565. Each contributes 3 points.Confidence: medium
Needs human?: yes — expected milestone 13.6 is not open; the configured 13.5.x/13.6 release context is stale relative to the reported build; confirm the target release and owner availability