Skip to content

How to Capture a Process Crash Dump with Windows Error Reporting Print

  • 0

Windows Error Reporting LocalDumps can preserve a user-mode process dump when an application crashes. The dump gives a developer or support engineer evidence about the failing process at that moment. It is not a repair, and it does not automatically capture a hung application, a normal shutdown or every process terminated externally.

This procedure enables per-executable collection for an illustrative application named OrdersWorker.exe on Windows Server. Use the real executable name, not the service display name or application-pool name. Configure the smallest useful scope and remove the temporary collection setting when the investigation is complete.

Confirm that a crash dump fits the incident

Collect the application version, executable path, architecture, service identity, crash timestamps and relevant Application events. Distinguish an unhandled user-mode crash from a service startup failure, hang, kernel crash or intentional process kill. Different failure types require different collection methods.

Ask the application support owner whether a minidump or full dump is needed and whether symbols or matching binaries will be available. A full dump contains more process memory and can be substantially larger. A minidump can be sufficient for some exceptions but omit the state needed for others.

Check whether the application uses its own custom crash reporter or an automatic debugger configuration. Microsoft's LocalDumps documentation describes limitations for those cases. If WER is not the appropriate capture path, choose an approved alternative such as a vendor-supported tool or Microsoft Sysinternals ProcDump with a reviewed trigger.

Protect memory data before enabling collection

A dump can contain passwords, tokens, private customer data, database results and application secrets that happened to be in memory. Treat it as sensitive diagnostic data. Decide who can read it, where it will be stored, how it will be transferred and when it will be deleted.

Choose a local persistent volume with enough free space and monitoring. Do not write full dumps to a nearly full system volume or an ephemeral location that disappears before analysis. Estimate capacity from process memory, expected crash frequency and the retained dump count, allowing headroom for other workloads.

Use a dedicated directory, for example D:\CrashDumps\Orders, with access limited to authorized administrators, the required system components and the crashing process identity. A custom dump folder needs suitable ACLs; an inaccessible folder is a common reason no file appears.

Record existing settings and create the folder

Open an elevated Windows PowerShell session. Inspect the global LocalDumps key and any existing application-specific key before changing them. Global defaults may already be part of an operational policy; a per-application configuration overrides relevant defaults for that executable.

$key = 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\OrdersWorker.exe'
Get-ItemProperty -Path $key -ErrorAction SilentlyContinue
New-Item -ItemType Directory -Path 'D:\CrashDumps\Orders' -Force

Preserve existing values through the approved registry backup or configuration record. Apply the folder ACL using the organization's supported access-management method. Grant the application's actual identity the required write access and verify inheritance does not leave unrelated users able to read dumps.

For a service running as System, Local Service, Network Service or a custom account, consider its actual context rather than your interactive profile. Default WER paths can be service-profile-specific. An explicit protected path makes collection easier to find, provided its permissions are correct.

Configure a bounded per-application capture

The following example requests full user-mode dumps and retains a small count:

New-Item -Path $key -Force
New-ItemProperty -Path $key -Name DumpFolder `
    -PropertyType ExpandString -Value 'D:\CrashDumps\Orders' -Force
New-ItemProperty -Path $key -Name DumpType `
    -PropertyType DWord -Value 2 -Force
New-ItemProperty -Path $key -Name DumpCount `
    -PropertyType DWord -Value 3 -Force

DumpType 1 requests a minidump; DumpType 2 requests a full dump. Use the support team's agreed choice rather than always selecting the largest output. DumpCount limits retained files through WER's behavior, but it is not a substitute for volume monitoring or a retention policy for copies exported elsewhere.

Keep the application filename exact, including its extension. A service may launch a differently named worker, and several applications can share a host executable. A per-executable key for a shared host can affect more processes than the business application name suggests.

Verify configuration without crashing production deliberately

Read the resulting values and inspect directory permissions:

Get-ItemProperty -Path $key | Select-Object DumpFolder,DumpType,DumpCount
Get-Acl 'D:\CrashDumps\Orders' | Format-List

Confirm registry value types as well as their displayed values. Keep the setting aligned with Microsoft's documented registry location and the process environment; do not copy arbitrary duplicate registry keys from an old forum recipe without understanding architecture and tool behavior.

If an approved reproduction exists in a test environment, use it to validate capture there. On production, wait for the naturally occurring failure or follow an explicitly approved support reproduction plan. Do not terminate or deliberately crash a business process merely to prove a registry change took effect.

Collect the next relevant failure

When the crash occurs, note the exact time, affected instance and user-visible impact. Allow the dump-writing process to finish; large dumps can take time and create disk activity. Confirm the application recovery mechanism behaves as intended rather than assuming service restart and dump capture cannot interact.

Inspect the dump filename, size and timestamp and correlate them with the application's crash event. Preserve the matching executable version, modules or deployment identifier and available logs. A dump without its build context can be much harder to analyze.

Do not open the file in an ordinary text editor or attach it to a broadly visible ticket. Transfer it through the approved secure channel to the authorized analyst. If a checksum is used to verify transfer integrity, retain it with the case rather than treating it as evidence that the dump contains no sensitive material.

Investigate missing dumps systematically

First confirm that the observed event was an eligible user-mode crash. A hung application may still be running, a process may have exited cleanly with an error code or another component may have killed it. Those situations do not necessarily trigger LocalDumps.

Check the exact executable name, per-application registry path, value types, folder existence, permissions and free space. Review application-specific crash reporting and debugger settings. Check endpoint protection or storage controls through their documented logs rather than disabling them globally.

If a shared host crashes, verify which process instance and application were involved. For IIS, an application-pool recycle is not automatically a crash. For a service, a Service Control Manager failure event may describe a process exit without establishing that WER could capture an unhandled exception.

Use the dump as evidence, then retire collection

Analysis should identify the exception and relevant execution state using suitable debugging tools, matching symbols and application expertise. A faulting module named in an event is a lead, not automatic proof that the module's vendor caused the defect. Avoid presenting collection itself as a diagnosis.

After the investigation, restore the previous per-application settings or remove only the key created for this change. Do not remove the global LocalDumps key if other applications depend on it. Existing dump files remain after registry rollback and need separate retention or secure deletion handling.

Record the configuration, captured event, file handling and cleanup decision. Microsoft's LocalDumps documentation and WER settings reference define the supported values and limitations.

Related procedures

How to Configure a Dedicated Service Account for a Windows Application; How to Configure IIS Application Pool Recycling; How to Enable IIS Failed Request Tracing.


Was this answer helpful?

« Back