Not working with Blazor application
See original GitHub issueI configured the Blazor app that comes with .NET CORE 3.0 in VS2019, but no log is generated 😦
Added in Counter.razor page:
@code {
int currentCount = 0;
void IncrementCount()
{
currentCount++;
throw new InvalidOperationException("Test");
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
My deployed Blazor application only shows “Loading ...
My deployed Blazor application only shows “Loading…” Why is the deployed Blazor application not working? ... You must update the virtual app path...
Read more >net 6 blazor wasm hot reload not working
I'm using Visual Studio 2022 and created a new Blazor webassembly app and ran it. The option for hot reload on file save...
Read more >Asp.net core web application BLAZOR not starting
Empty new BLAZOR project. Press F5, web browser appaers and waiting. After some time it closes. Event log shows error: Application ...
Read more >Blazor app crashes when debugging after windows ...
Blazor app crashes when debugging after windows secutiry updates ... A free and open-source web framework that enables developers to create web ...
Read more >Blazor server app not working when deployed, works fine ...
I have a Blazor server-side project which I've been developing in Visual Studio 2019, using .NET5. All has been working fine. I've just...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Had a quick look at this again. The new
<ErrorBoundary>
component in .NET 6 can be useful here. It normally is used to wrap components that might have issues on a page, but it’s possible (but not advisable?) to wrap the whole App in one.The component itself does not allow intercepting the error to log it, but you can create a subclass which can:
You would then wrap the router in the
App.razor
in this:Worth experimenting with but there may be issues with this approach I’ve not considered.
Elmah logs unhandled server errors. If you already do try/catch, it won’t. However, you can log manually in your catch block like
ElmahExtensions.RaiseError(ex);