Forward VS Code debug output to dashboard logs, apphost errors show in Aspire debug session console#16512
Open
adamint wants to merge 4 commits intomicrosoft:mainfrom
Open
Conversation
Forward non-telemetry debug adapter output events from VS Code resource sessions to DCP service logs so JavaScript/Vite output that appears in the Debug Console also appears in the Aspire Dashboard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16512Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16512" |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the VS Code extension’s debug integration by forwarding non-telemetry Debug Adapter Protocol (DAP) output events to the DCP service logs, so that Node/Vite output visible in the VS Code Debug Console also appears in the Aspire Dashboard logs for JavaScript resources launched under VS Code debugging.
Changes:
- Forward all non-telemetry DAP
outputevents (not juststdout/stderr) to DCP asserviceLogs. - Add unit coverage validating that non-telemetry categories are forwarded and telemetry output is ignored.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| extension/src/debugger/adapterTracker.ts | Broadened forwarding logic to send non-telemetry debug adapter output events as DCP serviceLogs. |
| extension/src/test/adapterTracker.test.ts | Added tests ensuring non-telemetry output events are forwarded (with correct stderr mapping) and telemetry output is excluded. |
Member
Author
|
I confirmed the following 4 cases work:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Forward non-telemetry VS Code debug adapter output events to DCP service logs so output shown in the VS Code Debug Console also appears in Aspire Dashboard console logs.
This fixes JavaScript resource logs by launching Node resources through VS Code js-debug's
pwa-nodeadapter withoutputCapture: "std", which is required for package-manager and Vite stdout/stderr to be emitted as Debug Adapter Protocol output events. The tracker forwards those output events to DCP asserviceLogs.This also incorporates and supersedes the AppHost startup failure reporting from #16516. This is because pwa-node tracking would also be required to get ts AppHost stderr. AppHost failures that happen before the child debug session starts now write details to the Debug Console as stderr instead of only showing a dialog. Build failures whose output was already streamed are not replayed a second time, and AppHost child debug output is mirrored back to the parent Aspire Debug Console so TypeScript AppHost runtime/startup errors are visible in the same place as C# AppHost errors.
Fixes #16468
Fixes #15578
Validation:
npm run compile-testsnpm run unit-test -- --grep "Node Debugger Tests|Debug Adapter Tracker Tests|failed AppHost start"Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: