Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blazor shouldn't enable debugging when not debugging #87178

Closed
danroth27 opened this issue Apr 17, 2023 · 13 comments · Fixed by dotnet/aspnetcore#49385
Closed

Blazor shouldn't enable debugging when not debugging #87178

danroth27 opened this issue Apr 17, 2023 · 13 comments · Fixed by dotnet/aspnetcore#49385
Assignees
Labels

Comments

@danroth27
Copy link
Member

With .NET 8 Preview 3, I’m seeing the following dotnet.generated.invalid node show up in the sources tab of the browser dev tools when running a new Blazor WebAssembly app:

image

I don't see any other errors in the browser dev console.

Repro steps:

  • Install .NET 8 Preview 3 SDK
  • dotnet new blazorwasm
  • dotnet run
  • Open the browser dev tools and look at the Source tab

Expected result:

  • No dotnet.generated.invalid node
  • Jiterpreter generated wasm modules are shown

Actual result:

  • A dotnet.generated.invalid node shows up
  • No generated wasm modules shown
@danroth27
Copy link
Member Author

@kg

@danroth27 danroth27 added the arch-wasm WebAssembly architecture label Apr 17, 2023
@kg
Copy link
Contributor

kg commented Apr 17, 2023

dotnet.generated.invalid is normal, it's the JS interop binding glue. the issue here is jiterpreter being missing.

@kg
Copy link
Contributor

kg commented Apr 18, 2023

I see "Debugging hotkey: ..." when starting a sample with 'Start Without Debugging' from Visual Studio, which suggests that the interpreter is being launched with debugging enabled. If debugging is enabled that would block the jiterpreter. Examining the jiterpreter configuration indicates that it is still enabled.

@kg
Copy link
Contributor

kg commented Apr 18, 2023

Looking at the blazor.boot.json sent over the wire when running via this path, i see "debugBuild": true even though VS is set to Release.

@kg
Copy link
Contributor

kg commented Apr 18, 2023

https://github.com/dotnet/aspnetcore/blob/4038965d69c30f0977e112ba312c68627437ea37/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts#L218 appears to suggest that as things are configured by blazor right now, debugging is always active so the jiterpreter will not engaged (this is required for correctness). Let me know if I'm misreading the code and I can dig in further.

@kg
Copy link
Contributor

kg commented Apr 18, 2023

Editing the boot json to disable debugBuild and remove the pdbs (if there are any pdbs, it forces debugging on) causes the jiterpreter to engage as expected, and this appears to improve performance significantly. 👍

@danroth27 danroth27 transferred this issue from dotnet/runtime Apr 18, 2023
@ghost
Copy link

ghost commented Apr 18, 2023

Thanks for contacting us.

We're moving this issue to the .NET 8 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@danroth27 danroth27 changed the title A dotnet.generated.invalid node shows up in the browser dev tools when running a .NET 8 Preview 3 Blazor WebAssembly app Blazor shouldn;t enable debugging when not debugging Apr 25, 2023
@danroth27 danroth27 changed the title Blazor shouldn;t enable debugging when not debugging Blazor shouldn't enable debugging when not debugging Apr 25, 2023
@mkArtakMSFT
Copy link
Member

@lewing now that the runtime will be handling the boot process for Blazor, is this something that you will be taking care of?

@mkArtakMSFT
Copy link
Member

mkArtakMSFT commented May 25, 2023

@kg has this been addressed as part of the SDK changes?
/cc @pavelsavara, @maraf

@maraf
Copy link
Member

maraf commented May 31, 2023

Not yet, code about resolving whether debugging is enabled, printing the message to console, etc stills need consolidation. I'll assign myself as the changes should end in the runtime codebase

@maraf maraf self-assigned this May 31, 2023
@mkArtakMSFT
Copy link
Member

@maraf should I just move this to the runtime repo then?

@maraf
Copy link
Member

maraf commented Jun 6, 2023

It can be moved. Changes need to happen in both repositories.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jun 6, 2023
@mkArtakMSFT mkArtakMSFT transferred this issue from dotnet/aspnetcore Jun 6, 2023
@ghost
Copy link

ghost commented Jun 6, 2023

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

Issue Details

With .NET 8 Preview 3, I’m seeing the following dotnet.generated.invalid node show up in the sources tab of the browser dev tools when running a new Blazor WebAssembly app:

image

I don't see any other errors in the browser dev console.

Repro steps:

  • Install .NET 8 Preview 3 SDK
  • dotnet new blazorwasm
  • dotnet run
  • Open the browser dev tools and look at the Source tab

Expected result:

  • No dotnet.generated.invalid node
  • Jiterpreter generated wasm modules are shown

Actual result:

  • A dotnet.generated.invalid node shows up
  • No generated wasm modules shown
Author: danroth27
Assignees: maraf, MackinnonBuck
Labels:

bug, arch-wasm, area-Debugger-mono

Milestone: -

@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jul 14, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants