I've had a Windows app in production for a while now, and have it set up to send us error reports when it throws exceptions. Most of these are fairly descriptive and help me find the problem very quickly (I use the MS Application Exception Block).
On a few occasions I have reports that are issues that I can't reproduce, and seem to only happen on a few client machines.
I don't have physical access to these client machines, what are some strategies I can use for debugging? Would it be better to build some tracing into the code, or are there some other alternatives?
Thank you.
Edit: I should have been more clear: The error reports that I get do have the stack trace, but since it's production code, it doesn't indicate the exact line that caused the exception, just the method in which it was thrown.
Production debugging, as the name suggests, takes place when one must debug the production environment and see the root cause of this problem. This is a form of debugging that can also be done remotely, as during the production phase, it may not be possible to debug within the local environment of the application.
ASP.NET MVC 5 for Beginners Debugging allows the developers to see how the code works in a step-by-step manner, how the values of the variables change, how the objects are created and destroyed, etc.
In a long time, it also becomes impossible to recreate the exact environment. Hence, having a way to debug in production is an extremely useful tool, since it eliminates the need to reproduce issues locally. Instead, you can find and resolve the problem on the running system.
One option is to generate a (mini-)dump file as close to the point where the exception is thrown as possible. This article talks about how to do this from managed code.
You could then load the dump file into Visual Studio or WinDbg and examine it with the aid of SOS
You are on the right track. You need to create a tracking module which logs actions/exceptions locally.
You can then have a button or a menu option that the user can click to either automatically email you this information the moment the issue occurs, or they can have the option to get hold of the file so that they can transfer it to you in any other way.
You can even build-in a diagnostics code to run an integrity check on the system and sends you a report (maybe it runs all your unit tests to see if they work on that system).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With