Skip to content

Prevent Edge compatibility relaunch from breaking browser debugging - #20152

Merged
Adam Ratzman (adamint) merged 2 commits into
mainfrom
copilot/fix-blazor-debug-in-browser-issue
Sep 16, 2026
Merged

Adam Ratzman (adamint) merged 2 commits into
mainfrom
copilot/fix-blazor-debug-in-browser-issue

Conversation

Copilot AI commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

When VS Code inherits __COMPAT_LAYER=DetectorsAppHealth, Edge can replace its initial process, causing js-debug to cancel target discovery and leave Blazor Debug in Browser at about:blank.

  • Mitigation: Explicitly set __COMPAT_LAYER: null in Windows Edge launch configurations, including managed Blazor attach. Remove case-insensitive aliases while preserving other variables, Chrome behavior, and the parent process environment.
  • Coverage: Add configuration regressions and run the existing Windows managed-breakpoint E2E scenarios with the reported compatibility setting. Validation through the affected Windows ARM64 panel workflow remains outstanding.

Related evidence: github/app#1227 reports the same inherited __COMPAT_LAYER=DetectorsAppHealth causing Edge's initial process to exit and breaking browser automation outside Aspire. That issue was reported fixed by no longer propagating the variable to child processes.

Before

Error and no browser launch:
image

After

Browser launched without error:
image

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?
        • Yes
        • No
    • No

Copilot AI changed the title [WIP] Fix Blazor Debug in Browser issue with Edge compatibility Prevent Edge compatibility relaunch from breaking browser debugging Sep 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the Edge environment override, the generic and managed Blazor launch paths, session cleanup, and the E2E runner and coverage.

I didn't find any correctness or architectural issues. I also validated the fix manually through Debug in Browser.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20152

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20152"

@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

0 / 99 PR test projects · 2 PR jobs, from 5 changed files.

Selected PR test projects (0 / 99)

none — no PR-gated .NET test projects run for this change.

Selected PR jobs (2)

extension-e2e, extension-unit


How these were chosen — grouped by what changed

Job reasons

Job Triggered by
extension-e2e extension/scripts/run-e2e.js, extension/src/debugger/languages/browser.ts, extension/src/test-e2e/browserDebugger.e2e.test.ts, extension/src/test/browserDebugger.test.ts, extension/src/test/e2eLaunchProfile.test.ts
extension-unit extension/scripts/run-e2e.js, extension/src/debugger/languages/browser.ts, extension/src/test-e2e/browserDebugger.e2e.test.ts, extension/src/test/browserDebugger.test.ts, extension/src/test/e2eLaunchProfile.test.ts

Selection computed for commit 7202f8b.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ CI Failure Analysis: Possible Flaky Test(s)

The CI build failed due to test failure(s) that appear unrelated to the PR changes. These may be flaky tests.

Suspected flaky test(s):

  • Aspire.Hosting.JavaScript.Tests.NodeFunctionalTests.VerifyNodeAppWorks in job Tests / No-package tests (regular, Aspire.Hosting.JavaScript.Tests, Hosting.JavaScript, Hosting.JavaScrip... / Hosting.JavaScript (windows-latest)
    • Error: Class fixture type 'Aspire.Hosting.JavaScript.Tests.NodeAppFixture' threw in InitializeAsync
      ---- System.Threading.Tasks.TaskCanceledException : A task was canceled.
    • Stack Trace (first frames):
----- Inner Stack Trace -----
   at Aspire.Hosting.Dcp.DcpExecutor.CreateRenderedResourcesAsync[TDcpResource,TContext](IObjectCreator`2 creator, IEnumerable`1 resources, TContext context, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Dcp/DcpExecutor.cs:line 966
   at Aspire.Hosting.Dcp.DcpExecutor.RunApplicationAsync(CancellationToken ct) in /_/src/Aspire.Hosting/Dcp/DcpExecutor.cs:line 266
   at Aspire.Hosting.Orchestrator.ApplicationOrchestrator.RunApplicationAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Orchestrator/ApplicationOrchestrator.cs:line 636
   at Aspire.Hosting.JavaScript.Tests.NodeAppFixture.InitializeAsync() in D:\a\aspire\aspire\tests\Aspire.Hosting.JavaScript.Tests\NodeAppFixture.cs:line 43
  • Why likely flaky: Matches known recurring flaky DCP/InitializeAsync timeout on windows-latest for Aspire.Hosting.JavaScript.Tests, unrelated to the PR's VS Code extension changes.
  • Aspire.Hosting.JavaScript.Tests.NodeFunctionalTests.VerifyNpmAppWorks in job Tests / No-package tests (regular, Aspire.Hosting.JavaScript.Tests, Hosting.JavaScript, Hosting.JavaScrip... / Hosting.JavaScript (windows-latest)
    • Error: Class fixture type 'Aspire.Hosting.JavaScript.Tests.NodeAppFixture' threw in InitializeAsync
      ---- System.Threading.Tasks.TaskCanceledException : A task was canceled.
    • Stack Trace (first frames):
----- Inner Stack Trace -----
   at Aspire.Hosting.Dcp.DcpExecutor.CreateRenderedResourcesAsync[TDcpResource,TContext](IObjectCreator`2 creator, IEnumerable`1 resources, TContext context, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Dcp/DcpExecutor.cs:line 966
   at Aspire.Hosting.Dcp.DcpExecutor.RunApplicationAsync(CancellationToken ct) in /_/src/Aspire.Hosting/Dcp/DcpExecutor.cs:line 266
   at Aspire.Hosting.Orchestrator.ApplicationOrchestrator.RunApplicationAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Orchestrator/ApplicationOrchestrator.cs:line 636
   at Aspire.Hosting.JavaScript.Tests.NodeAppFixture.InitializeAsync() in D:\a\aspire\aspire\tests\Aspire.Hosting.JavaScript.Tests\NodeAppFixture.cs:line 43
  • Why likely flaky: Matches known recurring flaky DCP/InitializeAsync timeout on windows-latest for Aspire.Hosting.JavaScript.Tests, unrelated to the PR's VS Code extension changes.
  • Aspire Blazor browser debugger E2E hits a managed breakpoint for standalone in job Tests / Run VS Code extension E2E tests / VS Code extension E2E (Windows, browser-debugger)
    • Error: Failed to apply E2E control revision 1789531759941: Error: Timed out after 288854ms waiting for pwa-msedge child session for Blazor WASM root 'ae3555c4-1297-44ef-9be8-17a5e0399e5b'. Last error: . State includes debugSessions with type 'monovsdbg_wasm', name 'Wasm Managed Debugger', configuration targeting StandaloneClient, HostedPerPage, and HostedGlobal Blazor WASM projects under net11.0.
    • Stack Trace (first frames):
Error: Failed to apply E2E control revision 1789531759941: Error: Timed out after 288854ms waiting for pwa-msedge child session for Blazor WASM root 'ae3555c4-1297-44ef-9be8-17a5e0399e5b'.
  • Why likely flaky: This exact error pattern (timeout waiting for pwa-msedge child session for a Blazor WASM root) has recurred across at least 16 prior CI runs on many unrelated PRs, jobs, and operating systems, indicating a systemic environment/timing issue in the browser-debugger E2E scenario rather than a regression introduced by this PR.

Suggested actions:

  • Re-run the failed CI jobs to confirm if the failure is intermittent
  • If the test continues to fail, consider quarantining it using /quarantine-test <test name> <issue URL>
  • Search existing issues to see if this test is already known to be flaky

You can re-run the failed jobs from the workflow run page.

@github-actions github-actions Bot locked and limited conversation to collaborators Oct 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VS Code: Blazor "Debug in Browser" fails when Edge relaunches under Windows compatibility settings

3 participants