Debugging Client PC’s

Sometimes, when developing software it takes a bit of effort to get things right, and early releases can be a bit unstable resulting in crashes and other frustrations. So… how to fix these issues and make it right for the end user.

One proactive step you can take is to analyse the dump files that Windows produces, and work out from this what went wrong. To do this you need to get Windows to produce these CrashDumps, and this is done simply downloading the file “error_reporting.vbs” below, and getting your client to run this. All it does is set the registry key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\DumpType” to the value 1. If(when) the program crashes, a dump gets written to C:\Users\[user]\AppData\Local\CrashDumps which he can then sent to you for analysis.

Before you can use this dmp file your client has provided, you first have to set up your project to generate the pdb files alongside the usual dll’s and exe’s that you compile. When releasing your application you need to keep these, alongside the commit id of the actual source code used to generate these artifacts. New visual studio projects seem to have this set on release builds by default, but older projects might not.

So, you need to set the property pages to look like the following:

the next step, once you have the client supplied dmp file, is to place it into a folder alongside the pdb files you saved when you compiled your project, then to check out the version of files you used to compile with, then double click on it, and select to start with visual studio. Once there, click the run arrow or press F5. You may need to set up within visual studio paths to a symbol server or where to find the source code, some detail is given in the links below.

Once you do this you will see something like the following:


And you can see this tells us we forgot to initialize some memory. Oh well, more work to do till it’s all sorted I guess.