We have a native C++ Win32 .exe built using Visual Studio 2005 that works flawlessly on all the machines we’ve tested in-house on (XP 32-bit, Vista 32-bit & Windows 7 64-bit). But of course, it crashes repeatedly on a client’s 32-bit Vista machine.
Digging around on several websites I found tidbits that indicate if I ship the PDB files (vc80.pdb & projectName.pdb) along with the Release build of the executable to the customer, there is some way of generating minidumps when a crash occurs. I can then load the crash dump into Visual Studio and get a stack trace and some other useful information. Microsoft’s Dr. Watson utility also seems to be involved in this process.
But I can’t find any clear instructions on the steps to follow to make this happen
- what files to ship?
- how to get a crash dump to be generated?
- and how to load this into VS?
Can someone please describe this process?
We are able to get crash dumps from our Release builds out in the field and do not need to ship the pdb files with our product.
We build in calls to create the crash dump file ourselves in our top-level exception handler using MiniDumpWriteDump(). But even without that, you could have the user generate the crash file at the point of the crash using task manager as documented here: MSDN Instructions for creating dump file.
Once you have the dump file, the customer zips and mails it to you and you drop it onto Visual Studio. Within VS, you then pick Debug with Mixed or Debug with Native Only and it uses your local copy of the pdb files to show you the call stack, etc.