我正在尝试在我的应用程序中使用 Environment.FailFast()。 MSDN 文档说它在应用程序终止期间创建应用程序转储。
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.
有人可以指引我到创建转储的位置吗?
最佳答案
我使用以下代码重现了这个问题:
Environment.FailFast("Something bad happened");
您需要为其添加正确的注册表项以将转储放置在您想要的位置,或者您可以阅读它以找到位置。这是注册表项:
这是
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps
您可以在 Getting full user mode dumps automatically when your process crashes 中阅读有关其他选项的更多信息.
关于c# - Environment.FailFast() 创建的应用程序转储位于磁盘的什么位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7808541/