'How to Debug .NET MAUI Blazor Hybrid Windows UI

I am basically from Web Background and trying out .NET MAUI Blazor Hybrid. I am running into error during development for .NET MAUI Window, not sure how to debug it ? I have looked around all type of windows and cannot find error details anywhere.

I Tried debugging, but that is headspining, as it goes into loop for long.

image



Solution 1:[1]

You have to ensure that the WebDev Tools are activated. Browser developer tools with .NET MAUI Blazor

Ensure the Blazor Hybrid project is configured to support browser developer tools. You can confirm developer tools support by searching the app for AddBlazorWebViewDeveloperTools

If the project isn't already configured for browser developer tools, add support by:

  1. Locating where the call to AddMauiBlazorWebView is made, likely within the app's MauiProgram.cs file.

  2. After the call to AddMauiBlazorWebView, add the following code:

    #if DEBUG
        builder.Services.AddBlazorWebViewDeveloperTools();
    #endif
    

To use browser developer tools with a Windows app:

  1. Run the .NET MAUI Blazor app for Windows and navigate to an app page that uses a BlazorWebView.

  2. Use the keyboard shortcut Ctrl+Shift+I to open browser developer tools.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 JLeon