Skip to content
New issue

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

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

Already on GitHub? # to your account

[Problem/Bug]: The debugger message that explains event handler reentrancy and native debugging doesn't show up under Managed debugging #5056

Open
RichieHindle opened this issue Jan 26, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@RichieHindle
Copy link

What happened?

Debugging a .NET app that shows a dialog in a webview2 event handler halts the process with a message:

Running a message loop synchronously in an event handler in Webview can cause reentrancy issue. Please refer to https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/threading-model#re-entrancy for more information about threading model in WebView2 and how to enable native code debugging for this scenario.

Very nice and helpful - much appreciated!

But that message, which tells you to "enable native code debugging", only appears when you've already enabled native code debugging. If you're debugging using Managed debugging, the message doesn't appear. Your app simply disappears with no explanation.

I have precious little remaining hair, and I can't afford to spend hours pulling it out when my app just quits with no explanation. For the sake of all the future Richies who might have to go through this, please make that message appear under Managed debugging!

Importance

Moderate. My app's user experience is affected, but still usable.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

131.0.2903.146

SDK Version

1.0.2903.40

Framework

WPF

Operating System

Windows 10

OS Version

19045.5371

Repro steps

  1. Write a WPF app that shows a message box in a webview2 event handler.
  2. Debug your app using Managed debugging, not Native.
  3. Show the dialog and wait a few seconds.
  4. Watch as your app just vanishes with no exception and no explanation.
  5. Wish there had been a debug message to explain what happened.

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

@RichieHindle RichieHindle added the bug Something isn't working label Jan 26, 2025
@RichieHindle RichieHindle changed the title [Problem/Bug]: The debugger message that explains event handler reentrancy and native debugging only shows up under native debugging [Problem/Bug]: The debugger message that explains event handler reentrancy and native debugging doesn't show up under Managed debugging Jan 26, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant