How to use dump files
I recently developed a Windows program (win7/Win8). In some cases, crash occurs. If debugging is simple on a self-developed machine: run the program, then vs attach can be used on the process, but it is unrealistic to install vs on each QA machine. Therefore, we need to use the dump file.
Microsoft has an article on how to create a dump file:
Http://support.microsoft.com/kb/931673
First: Use the Task Manager: The process has not exited when the program crashes (crash). For example, when I run the program, the following error occurs:
Open the task manager, right-click the corresponding process, and click "create dump file":
Creation will be completed later:
Then copy the DMP file to the development machine and open it with vs: The following interface will appear. To know the call stack when an error occurs, you need to set the symbol path, click "set symbol paths":
Note that this PDB corresponds to the crash EXE, otherwise the call stack cannot be displayed:
After setting, click "debug with native only" to view the call stack.
Type 2: Modify the Registry
If no box pops up during the crash process, you can modify the registry settings so that the operating system can automatically generate dump during the crash process and put it in a specific directory.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumpsValue Name = DumpTypeData type: REG_DWORDValue Data = 1
Value Data = 1 indicates:
0 = Create a custom dump1 = Mini dump2 = Full dump
After the setting is complete, dump is generated by the operating system when the crash occurs. The path is under % localappdata % \ crashdumps. For details, refer:
Http://msdn.microsoft.com/en-us/library/bb787181%28v=VS.85%29.aspx
(End)