I have the Blazor component library, I need to debug it. The library can be used in Blazor WASM and Blazor Server-Side Apps. For debug purposes I do some console output:
Console.WriteLine("Hello!")
In the Blazor WASM app I can see it in the Browser Console.
Where can I see it in case of Blazor Server-Side App? Is using of the Debug.WriteLine method the only way to see the output? Is there a common way to write debug information for both Blazor WASM and Server-Side?
PS: There is no Console output in Debug window in case of Blazor Server-Side App.
.NET6
If you are using Visual Studio on Windows, try selecting the name of the project when debugging Blazor Server App.
A console window will open and this is where your standard output is redirected. Anything you output from Console.WriteLine is shown there. What you write with Console.WriteLine is output to a standard output. In case of Linux app this would be terminal output.
.NET7
There are new options. If you select http or https in the same menu the console will appear (VS 17.9.3)