dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.46k stars 10.03k forks source link

Error hard to debug because of minified JS #54555

Open bruno-garcia opened 8 months ago

bruno-garcia commented 8 months ago

Is there an existing issue for this?

Describe the bug

The error is caused due to the client browser not supporting WebAssembly, or the version they support not having all features. So not a Blazor bug.

image

I'd like to dig deeper into such errors, but all the JS shipped by Blazor is minified (which makes sense).

Is the sourcemap generated as a result of that minification available anywhere?

Expected Behavior

Be able to do one of:

  1. Download Blazor's sourcemaps for each release
  2. Run webpack or whatever bundler so I can generate sourcemaps

This way I can either ship sourcemaps with my website or upload them to https://sentry.io

Steps To Reproduce

Shared (public) error: https://demo.sentry.io/share/issue/d24373d8406e48e2a3a3aa8725faf297/

Exceptions (if any)

No response

.NET Version

8.0.201

Anything else?

No response

mkArtakMSFT commented 7 months ago

@thaystg do you know if there is a tooling support for this already?

thaystg commented 7 months ago

@lewing Can you help with this one? I think it's more related to your side then debugger side.

lewing commented 7 months ago

cc @maraf

maraf commented 7 months ago

@bruno-garcia We generate and provide source maps for .NET runtime JS files. It's enabled by default for build and you can explicitly enable it for publish with MSBuild property <WasmEmitSourceMap>true</WasmEmitSourceMap>.

image