--- title: Troubleshoot ASP.NET Core Blazor Hybrid author: guardrex description: Learn how to troubleshoot issues in ASP.NET Core Blazor Hybrid with BlazorWebView logging. monikerRange: '>= aspnetcore-8.0' ms.author: riande ms.custom: "mvc" ms.date: 02/09/2024 uid: blazor/hybrid/troubleshoot --- # Troubleshoot ASP.NET Core Blazor Hybrid has built-in logging that can help you diagnose problems in your Blazor Hybrid app. This article explains the steps to use logging: * Enable and related components to log diagnostic information. * Configure logging providers. * View logger output. ## Enable `BlazorWebView` logging Enable logging configuration during service registration. To enable maximum logging for and related components under the namespace, add the following code in the `Program` file: ```csharp services.AddLogging(logging => { logging.AddFilter("Microsoft.AspNetCore.Components.WebView", LogLevel.Trace); }); ``` Alternatively, use the following code to enable maximum logging for every component that uses : ```csharp services.AddLogging(logging => { logging.SetMinimumLevel(LogLevel.Trace); }); ``` ## Configure logging providers After configuring components to write log information, configure where the loggers should write log information. The **Debug** logging providers write the output [using `Debug` statements](xref:fundamentals/logging/index#debug). To configure the **Debug** logging provider, add a reference to the [`Microsoft.Extensions.Logging.Debug`](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Debug) NuGet package. [!INCLUDE[](~/includes/package-reference.md)] Register the provider inside the call to added in the previous step by calling the extension method: ```csharp services.AddLogging(logging => { logging.AddFilter("Microsoft.AspNetCore.Components.WebView", LogLevel.Trace); logging.AddDebug(); }); ``` ## View logger output When the app is run from Visual Studio with debugging enabled, the debug output appears in Visual Studio's **Output** window. ## Additional resources * [Logging in C# and .NET](/dotnet/core/extensions/logging) *