Blazor hybrid - identifying source of unhandled exceptions

John 21 Reputation points
2023-01-01T18:50:41.12+00:00

Hi,

I've inherited fairly large Blazor hybrid app based on Wpf.
Sometimes, the app shows the standard error : An unhandled error has occurred. Reload.
I read official docs on handling errors and as long as I understand there isn't any global event or anything that would help me to identify where this error comes from.

(I'm running the app from VS debugger but it doesn't break yet the error message shows. In DevTools in console is no error - I have verbose level. In VS debugger output is no message about error.)

Is there a way how to identoify it or I really have to go and add try catch into every single component, JavaScript, etc. ?

Many thanks

Developer technologies | .NET | Blazor
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.