Skip to content

WasmFingerprintAssets false breaks type/value information in WASM debugging #122201

Description

@ArcadeMode

Description

I have found that the build property WasmFingerprintAssets has been the cause of my severely impaired debugging experience on a WASM Browser App (SDK Microsoft.NET.Sdk.WebAssembly).

Stepping works somehow, control flow etc reflects fine, but anything related to types or locals is showing the error below. I have not been able to find any sensible logging explaining why, I managed to find this by stripping my solution down step by step.

Image

The browser console contains the following message, a couple dozen times.

Image

Reproduction Steps

A minimal repro that i verified on a sample project:

  1. Download the WASMBrowserAppImportExportInterop sample project
  2. Add <WasmFingerprintAssets>false</WasmFingerprintAssets> to the .csproj
  3. Rebuild
  4. Launch a debugging session from Visual Studio (I used 2026)

Expected behavior

The debugging experience remains the same with or without the WasmFingerprintAssets property set.

Actual behavior

Locals and type information is not available during debugging. Stepping still works.
Anything like a (quick)watch of local inspection attempt results in the message Internal error in the C# compiler.

Regression?

Known Workarounds

Keep WasmFingerprintAssets set to true resolves the debugging issues.

Configuration

Built with the latest .NET 10.0.100 SDK bundle. Running on the Mono wasm runtime.
Windows 10/11 same problem.

I presume this is not specific to my machine configuration.

Its happened in Chrome 142.0.7444.176

Other information

No response

Activity

  1. dotnet-policy-service commented on Dec 4, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @thaystg, @dotnet/dotnet-diag
    See info in area-owners.md if you want to be subscribed.

  2. dotnet-policy-service commented on Jan 29, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
    See info in area-owners.md if you want to be subscribed.

  3. pavelsavara commented on Jan 29, 2026

    @pavelsavara
    Member

    I guess this is somehow related to loaderHelpers._loaded_files and INTERNAL.mono_wasm_get_loaded_files()

  4. pavelsavara commented on Jan 29, 2026

    @pavelsavara
    Member

    The error is from

    // FIXME: error handling
    dbg_lock ();
    g_assert (id > 0 && GINT_TO_UINT(id) <= ids [type]->len);

    It would be great to see the whole stack trace.

    @ArcadeMode Could you please recompile the app with wasm workload and

    <PropertyGroup>
      <WasmNativeDebugSymbols>true</WasmNativeDebugSymbols>
      <WasmNativeStrip>false</WasmNativeStrip>
    </PropertyGroup>

    and capture the native stack trace again ?

    Thanks!

  5. pavelsavara commented on Jan 29, 2026

    @pavelsavara
    Member

    Is this trying to guess assembly name from URL (with fingerprint) ?

    if (args["url"]?.ToString()?.Contains("/_framework/") == true) //is from dotnet runtime framework
    {
    if (Contexts.TryGetCurrentExecutionContextValue(sessionId, out ExecutionContext context))
    context.FrameworkScriptList.Add(args["scriptId"].Value<int>());
    }
    return false;

  6. maraf commented on Jan 29, 2026

    @maraf
    Member

    The piece that tries to guess assembly name based on fingerprint is in https://github.com/dotnet/runtime/pull/103755/changes#diff-e11dabfb758c8f0b3b1dae36ce80d16749918b5fd6511f4226f7e98554f01676 (DebugStore.cs). It is for the older debugger. I'm not sure about the new debugger

  7. removed
    untriagedNew issue has not been triaged by the area owner
    on Jan 29, 2026
  8. added this to the 10.0.x milestone on Jan 29, 2026
  9. ArcadeMode commented on Feb 11, 2026

    @ArcadeMode
    ContributorAuthor

    I've gotten the following exceptions from the console with WasmNativeDebugSymbols and WasmNativeStrip set as asked.

    [MONO] * Assertion at /__w/1/s/src/runtime/src/mono/mono/component/debugger-agent.c:2043, condition `<disabled>' not met
    
    Error
        at Mc (logging.ts:125:60)
        at dotnet.native.wasm.wasm_trace_logger (dotnet.native.wasm:0x2b67f6)
        at dotnet.native.wasm.eglib_log_adapter (dotnet.native.wasm:0x4bb57)
        at dotnet.native.wasm.monoeg_g_logv_nofree (dotnet.native.wasm:0x495af)
        at dotnet.native.wasm.monoeg_assertion_message (dotnet.native.wasm:0x49755)
        at dotnet.native.wasm.mono_assertion_message (dotnet.native.wasm:0x497bc)
        at dotnet.native.wasm.mono_assertion_message_disabled (dotnet.native.wasm:0x4977b)
        at dotnet.native.wasm.decode_ptr_id (dotnet.native.wasm:0x9be82)
        at dotnet.native.wasm.mono_process_dbg_packet (dotnet.native.wasm:0xa2f40)
        at dotnet.native.wasm.mono_wasm_send_dbg_command (dotnet.native.wasm:0x90170)
    
    Image
    program exited (with status: 1), but keepRuntimeAlive() is set (counter=1) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)
    
    Image
  10. self-assigned this
    on Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions