Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Debugging MAUI Blazor App in Chrome style or getting errors seen

$
0
0

I try to migrate my web Blazor app to MAUI.

I'm curious, if there is the way to see tools like Chrome 'Console', 'Network' etc. while debugging MAUI Blazor app on Windows?The source of the question is my triage to migrate web app (Blazor) to desktop with plans to do so on mobile?Does somebody of you, community, tried to do so? The first experience I've got is getting instant error and 'loading...' message with asking to reload page - that's not very informative.

It would be much more helpful to see error details or to get access to tools like in browser, if possible.

Thank you in advance.

EDIT

Here is MainPage.xaml (modified):

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"             xmlns:local="clr-namespace:CBT.MAUI.Blazor"             xmlns:web="clr-namespace:CBT.Web.Blazor;assembly=CBT.Web.Blazor;"             x:Class="CBT.MAUI.Blazor.MainPage"             BackgroundColor="{DynamicResource PageBackgroundColor}"><BlazorWebView x:Name="blazorWebView" HostPage="wwwroot/index.html"><BlazorWebView.RootComponents><RootComponent Selector="#app" ComponentType="{x:Type web:App}" /></BlazorWebView.RootComponents></BlazorWebView></ContentPage>

I also tried to enable Serilog, but no file with errors was created.

var logger = new LoggerConfiguration()    .ReadFrom.Configuration(builder.Configuration)    .Enrich.FromLogContext()    .CreateLogger();builder.Logging.ClearProviders();builder.Logging.AddSerilog(logger);

The original line with logging to debug doesn't produce any output with errors:

builder.Logging.AddDebug();

Also I copied a Services.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>