Enable Crash Dumps

From truxwiki.com
Revision as of 05:54, 18 October 2022 by Sam (talk | contribs) (Created page with "You can set Windows to generate a memory dump file should a process crash. This makes debugging much easier. =Description= A memory crash dump is a file that contains the mem...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

You can set Windows to generate a memory dump file should a process crash. This makes debugging much easier.

Description

A memory crash dump is a file that contains the memory of a process that was running. The steps to configure Windows to generate these files is a process unexpectedly exist are described here and here.

Sample Script

The following PowerShell script will configure a machine to write a maximum of 500 crash dumps to a folder named "C:\ClusterStorage\Scratch\U05\CrashDumps"

New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "LocalDumps"
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Name "DumpFolder" -Value "C:\ClusterStorage\Scratch\U05\CrashDumps" -PropertyType "ExpandString"
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Name "DumpCount" -Value 500 -PropertyType DWord
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Name "DumpType" -Value 1 -PropertyType DWord