Where is the application dump created by Environment.FailFast() located on the disk?

谁都会走 提交于 2019-12-05 18:47:29

问题


I am trying to use Environment.FailFast() in my application. The MSDN documentation says that it creates an application dump during application termination.

The FailFast method writes the message string to the Windows Application event log, creates a dump of your application, and then terminates the current process. The message string is also included in error reporting to Microsoft.

Can someone direct me to the location where the dump is created?


回答1:


I used the following code to reproduce the issue:

Environment.FailFast("Something bad happened");

You need to add the correct registry entries for it to place the dump in your desired location or you can read it to find the location. Here is the registry key:

which is

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps

You can read more about other options in Getting full user mode dumps automatically when your process crashes.



来源:https://stackoverflow.com/questions/7808541/where-is-the-application-dump-created-by-environment-failfast-located-on-the-d

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!