Poor Man Display Errors–part 1 – idea

Let’s be honest, debugging can be a pain. You build your beautiful new web app (built with a snazzy backend API like .NET Core and a Blazor frontend – you know the drill!), everything seems great…until it isn’t. Suddenly, you are hitting errors, but you’re stuck hunting for clues in endless log files.

Sound familiar?

Wouldn’t it be amazing to see those errors pop up in real-time, right on your web interface? Imagine knowing exactly what went wrong without leaving the comfort of your application!

So let’s assume you make an Web Application composed , as usually now , from a backend WebAPI (.NET Core) and a frontend (Blazor ). ( What I will show to you could be adapted easy to any technology / framework )

Why not see the errors in real time on the web interface .

How to do this ?

Well, a solution will be to keep the errors in memory on the backend and display on the frontend .

Now, take your favorite logging framework (nlog/log4net/ serilog / others )  and see if it supports this .

I will show the code for Nlog in the next blog post