From 1479be684779803c98f64e63fb7fdc31559a95bb Mon Sep 17 00:00:00 2001 From: Blue Date: Tue, 6 Dec 2022 17:48:51 -0800 Subject: [PATCH] Add instructions on how to collect user-mode crashes --- CONTRIBUTING.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 27e45899..afa9a754 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -201,3 +201,24 @@ Make sure that the email body contains: - The Github issue number, if any - That this dump is destinated to the WSL team + +### 11) Reporting a WSL process crash + +The easiest way to report a WSL process crash is by [collecting a user-mode crash dump](https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps). + +To enable automatic crash dumps, run the following commands in an elevated command prompt: + +``` +md C:\crashes +reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /f +reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /v DumpFolder /t REG_EXPAND_SZ /d C:\crashes /f +reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /v DumpType /t REG_DWORD /d 2 /f +``` + +Crash dumps will then automatically be written to C:\crashes. + +Once you're done, crash dump collection can be disabled by running the following command in an elevated command prompt: + +``` +reg.exe delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /f +``` \ No newline at end of file