Windows debugging-how to use dump files

Source: Internet
Author: User

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.