Add instructions on how to collect user-mode crashes (#9275)
Blue committed
Dec 12, 2022 at 20:19 UTC
39802eac61237195ee6cb047e87d772f4003fd54
1 file changed
+21
CONTRIBUTING.md
+21
@@ -201,3 +201,24 @@ Make sure that the email body contains:
201
202
- The Github issue number, if any
203
- That this dump is destinated to the WSL team
204
+
205
+### 11) Reporting a WSL process crash
206
+
207
+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).
208
+
209
+To enable automatic crash dumps, run the following commands in an elevated command prompt:
210
+
211
+```
212
+md C:\crashes
213
+reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /f
214
+reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /v DumpFolder /t REG_EXPAND_SZ /d C:\crashes /f
215
+reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /v DumpType /t REG_DWORD /d 2 /f
216
+```
217
+
218
+Crash dumps will then automatically be written to C:\crashes.
219
+
220
+Once you're done, crash dump collection can be disabled by running the following command in an elevated command prompt:
221
+
222
+```
223
+reg.exe delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /f
224
+```
\ No newline at end of file