Sometimes when you are triaging bugs, finding the solution is simple and other times it’s complex, luckily Loupe has both scenarios covered, and everything in between as well!
On a good day, looking at the event will give you a clear idea of what the error is and you can go ahead and create an issue and have a developer fix it…
Other days the debugging God’s are not on your side. When that happens it’s not immediately obvious what the problem is from the exception. Here we can see that a “Network Exception” was thrown, but we have no real clue as to what caused it:
On those occasions, drilling into the exception and clicking on “Other Session Events” will show you what happened in the same session as your exception, and that can provide you with the solution you seek:
In this case we can see that the “Network Exception” was probably caused by an over-worked Active Directory server called AD1. Knowing this we can pass it on to our DevOps guys to have a look at.
If we’ve really upset the debugging Gods, they may decide to smite us completely. When that happens, not only do we get no helpful information from the exception:
But drilling down into the “Other Session Events” doesn’t help us much either!
Here we can see that there is a warning about a packager version mismatch, but no clue as to how that relates to our NullReferenceException! In these circumstances, it’s time to pull out the big guns! By drilling into the event on the “Recent Events” page, we can then click on the “Open Session” button:
This will open the full log in Desktop Loupe:
From here we can see sever log entries regarding instances being unpacked from some kind of file, for many of them this process was successfully completed and they have no bearing on our exception. However, one of them (highlighted) was packaged using an obsolete version of the packager. This resulted in a packager warning being generated, the errant object not being instantiated and, thus, a NullReferenceException being thrown.
Drilling into that log message in Desktop Loupe, we can even see which line of what file the problem occurred, leading to a speedy fix for this troublesome exception.
This post has shown you the power behind the fine grained logging offered by Loupe and how it can be used to hunt down even the most tricky of exceptions.
That’s all for this post, ‘til next time, happy coding!
The latest update to PostSharp Diagnostics adds Loupe support, enabling extensive high-performance logging to be added to any .NET application with virtually no code changes. PostSharp even has a great free option for developers that complements Loupe Desktop! Read more
The first release of the Loupe Agent for .NET Core is also our first open source version of the Loupe Agent. This is the first step in our plan to open source the entire Loupe Agent to make it easier for anyone to extend and take advantage of what Loupe... Read more
Loupe Service now has a shorter, direct site name that's faster, anywhere in the world. Just to go App.OnLoupe.Com, the new CDN-accelerated endpoint for the Loupe Service. Your existing Agents and Loupe Desktops are unaffected by this change, but access to the web UI will be redirected to the new... Read more