part of my Program.cs for loading Form1 that loads webview:
var host = Host.CreateDefaultBuilder(null)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>()
.UseSetting(WebHostDefaults.DetailedErrorsKey, "true"); // detailed errors
webBuilder.UseUrls("http://*:5000;http://localhost:5000;https://localhost:5001;");
webBuilder.UseWebRoot("wwwroot");
})
.ConfigureHostConfiguration(configHost =>
{
configHost.SetBasePath(Directory.GetCurrentDirectory());
})
.Build();
host.StartAsync();
ServiceProvider = host.Services;
var form1 = ServiceProvider.GetRequiredService<Form1>();
Application.Run(form1);
host.StopAsync();
with this, when any error occures in Blazor, the error location in .razor file not showing and the form1 is not accessible so that I use F12 console for error descriptions.
The Visual studio stops at line: Application.Run(form1);
and shows me a general error, like null reference exception. How to make error reporting as normal?