Skip to content

WebAssembly Debugging hangs with "A debugger operation is taking a long time" and "Unable to retrieve source content" in new Uno Web template (.NET 10 / .NET 9)Β #22673

@MishoNN-1986

Description

@MishoNN-1986

Current behavior πŸ›

When creating a brand new Uno Platform application using the Uno Platform Template Wizard and debugging the WebAssembly target in Visual Studio, debugging does not start correctly.

Visual Studio shows:
"A debugger operation is taking a long time to complete. Click 'Cancel' to stop waiting and terminate the process."

After that:
"Unable to retrieve source content."

Image

If I press Continue in Visual Studio, the app loads in the browser and debugging works normally.

If I uncheck:
Tools β†’ Options β†’ Debugging β†’ General β†’ Enable Just My Code

and start debugging again, I get:
System.NullReferenceException: 'Arg_NullReferenceException'
UIElement? IXamlRootHost.RootElement => Window.CurrentSafe.RootElement;

Image

After clicking Continue, the same long debugger operation message appears again, followed by:
"Unable to retrieve source content."

Again, pressing Continue allows the app to load and debugging works.

In very rare cases, debugging starts successfully without showing any of the errors and the app loads normally.

If I start the application without debugging (Ctrl + F5), the application always starts successfully without any errors in all cases.

I also tested the same project configuration using .NET 9 instead of .NET 10, and the issue still occurs with identical behavior.

Additionally, I manually added the following property to the WebAssembly project file:
MonoRuntimeDebuggerEnabled - true

This did not change the behavior.

I ran uno-check from the command line and installed any missing components. After that, uno-check reports no issues.
The problem still occurs.

The issue occurs in a completely new project without any modifications.

Expected behavior 🎯

WebAssembly debugging should start consistently without:

  • Long debugger operation message
  • "Unable to retrieve source content"
  • NullReferenceException when "Enable Just My Code" is disabled

Behavior during F5 debugging should match running without debugging (Ctrl + F5), which always works correctly.

How to reproduce it (as minimally and precisely as possible) πŸ”¬

  1. Create a new Uno Platform App using the Uno Platform Template Wizard

  2. Configuration:

  • Framework: .NET 10
  • Platforms: WebAssembly, Desktop
  • Presentation: None
  • Markup: XAML
  • Theme: Fluent
  • Extensions: None, Blank, Console
  • Features: PWA Manifest, Skia
  • Authentication: None
  • CI Pipeline: None
  1. Do not modify the generated project

  2. Select WebAssembly as startup project

  3. Start Debug (F5)

Result:

  • Visual Studio shows:
    "A debugger operation is taking a long time to complete."

  • Then:
    "Unable to retrieve source content."

  • Press Continue β†’ App loads in browser and debugging works.

Reproduction project attached.

WebTemplateApp.zip

Workaround πŸ› οΈ

No response

Renderer 🎨

  • Skia
  • Native

Affected platforms πŸ“±πŸ’»πŸ–₯️

WebAssembly

Uno.Sdk version (and other relevant versions) πŸ“¦

Uno.Sdk
Uno.Sdk: 6.5.31

Operating System
Windows 10 (10.0.19045) x64

.NET SDK
Version: 10.0.103

Installed .NET SDKs

  • 6.0.408
  • 7.0.202
  • 8.0.400
  • 8.0.405
  • 9.0.300
  • 9.0.301
  • 10.0.100-rc.2
  • 10.0.103

Relevant Workloads
Installed Workload Id Manifest Version Installation Source

android 36.1.2/10.0.100 SDK 10.0.100, VS 17.11.35312.102, VS 18.3.11505.172
ios 26.1.10502/10.0.100 SDK 10.0.100, VS 17.11.35312.102, VS 18.3.11505.172
maccatalyst 26.1.10502/10.0.100 SDK 10.0.100, VS 17.11.35312.102, VS 18.3.11505.172
maui 10.0.1/10.0.100 SDK 10.0.100
maui-windows 10.0.1/10.0.100 SDK 10.0.100, VS 17.11.35312.102, VS 18.3.11505.172
tvos 26.1.10502/10.0.100 SDK 10.0.100
wasm-tools 10.0.101/10.0.100 SDK 10.0.100, VS 18.3.11505.172
wasm-tools-net9 10.0.103/10.0.100 SDK 10.0.100, VS 18.3.11505.172

IDE version πŸ§‘β€πŸ’»

Visual Studio 2026 18.3.0

Anything else we need to know? πŸ’¬

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage/untriagedIndicates an issue requires triaging or verification

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions