TechBuzzPro

How to Configure Windows to Generate a Core Dump

· 6 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To make Windows generate a core dump (crash dump) when an application crashes, you need to enable and configure Windows Error Reporting (WER) local dumps. This is done through the Registry Editor by creating a key for the specific application (or for all applications) under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps. Once configured, Windows will write a .dmp file to a folder you specify whenever that application crashes. You need administrative rights and a basic comfort with the Registry Editor. This guide walks you through the exact steps, the values to set, and how to verify it worked.

What You'll Need

  • Administrator access to the Windows PC.
  • Registry Editor (regedit.exe) — built into Windows.
  • A folder path where dumps will be saved (create it beforehand, e.g., C:\Dumps).
  • Optional: a debugging tool like WinDbg or Visual Studio to analyze the .dmp file later.

Step-by-Step

  1. Create a folder for the dumps. Open File Explorer and create a folder such as C:\Dumps. Make sure the account running the application has write permission to this folder. For system-wide dumps, the folder must be writable by the crashing process (often SYSTEM or the user).
  2. Open Registry Editor as administrator. Press Win+R, type regedit, and press Enter. If prompted by User Account Control, click Yes.
  3. Navigate to the LocalDumps key. In the left pane, expand HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows > Windows Error Reporting. If a key named LocalDumps does not exist, right-click Windows Error Reporting, choose New > Key, and name it LocalDumps.
  4. Decide whether to configure dumps for all applications or one specific app. To capture dumps for every crashing application, you will add values directly under LocalDumps. To target a single application, right-click LocalDumps, choose New > Key, and name it exactly as the application's executable file name (e.g., myapp.exe).
  5. Set the dump folder path. Select the key you are configuring (either LocalDumps or the app-specific subkey). In the right pane, right-click and choose New > String Value. Name it DumpFolder. Double-click it and enter the full path to your folder, e.g., C:\Dumps. Do not include a trailing backslash.
  6. Set the dump type. Right-click in the right pane, choose New > DWORD (32-bit) Value, and name it DumpType. Double-click it and set the value data to one of the following: 0 for a custom dump (then also set CustomDumpFlags if needed), 1 for a mini dump (small, contains basic information), or 2 for a full dump (contains all memory, large file). For most debugging, a mini dump is sufficient; use full if you need complete memory analysis.
  7. Optional: limit the number of dumps kept. By default, Windows keeps up to 10 dumps per application. To change this, create a DWORD value named DumpCount and set it to the desired number (e.g., 5).
  8. Close Registry Editor. Changes take effect immediately for new crashes; no reboot is required.
  9. Test the configuration. Cause the application to crash (or use a test app that you can force to crash). After the crash, check your dump folder for a .dmp file. The file name typically includes the application name and a timestamp.

Common Mistakes

  • Wrong key location: Placing values under HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE. LocalDumps must be under HKLM for system-wide or service crashes.
  • Incorrect executable name: When using an app-specific subkey, the key name must match the process name exactly, including the .exe extension (e.g., notepad.exe).
  • Folder permissions: The crashing process may not have write access to the dump folder. Ensure the folder allows write for the user or SYSTEM account.
  • Using a full dump when a mini dump suffices: Full dumps can be very large (hundreds of MB or more) and may fill disk space quickly. Start with mini dumps unless you need full memory.
  • Forgetting to set DumpType: If DumpType is missing, Windows defaults to a mini dump, but it's better to set it explicitly.
  • Not testing: Always verify with a deliberate crash to confirm dumps are being written.

Tips

  • Use a dedicated folder like C:\Dumps and clean it periodically to avoid disk bloat.
  • For services or system processes, ensure the dump folder is on a local drive with sufficient free space.
  • If you need to capture dumps for a specific app only, the app-specific subkey approach keeps things tidy and avoids collecting dumps for every crash.
  • You can also configure WER to not show the UI by setting DontShowUI to 1 under the same key, but this is optional.
  • Remember that some applications have their own crash reporting that may interfere; disabling those can help ensure WER captures the dump.

Troubleshooting

  • No dump file created: Check that the registry values are correct (DumpFolder path exists, DumpType is set). Verify the application actually crashed (not just hung). Ensure the crashing process has write permission to the folder. Also, check Windows Error Reporting service is running (services.msc).
  • Dump file is empty or corrupt: This can happen if the disk is full or the process is terminated forcefully. Try a different dump type or ensure enough free space.
  • Dumps not generated for a specific app: Confirm the app-specific subkey name matches the executable name exactly. If the app runs under a different user account, ensure that account has access to the dump folder.
  • Registry changes not applied: Close and reopen the application, or reboot if the app is a service. Some apps may cache settings.
  • Permission denied when writing dump: Grant write permissions to the folder for the Everyone group (temporarily for testing) or the specific service account.

Frequently Asked Questions

Do I need to reboot after changing LocalDumps settings?

No, changes take effect immediately for new crashes. However, if the application is already running, it may need to be restarted to pick up the new settings.

What is the difference between a mini dump and a full dump?

A mini dump contains basic information like the call stack and loaded modules, and is small (typically a few MB). A full dump includes all memory used by the process and can be hundreds of MB or more, useful for deep analysis.

Can I configure dumps for a service?

Yes, the same LocalDumps registry settings apply to services. Ensure the dump folder has write permissions for the service's account (often SYSTEM or NetworkService).

Where does Windows save dumps by default if I don't set DumpFolder?

If DumpFolder is not specified, Windows uses the default location %LOCALAPPDATA%\CrashDumps for user-mode applications. For services, it may use %WINDIR%\System32\config\systemprofile\AppData\Local\CrashDumps.

Is it safe to edit the registry?

Yes, if you follow the steps carefully. Incorrect registry changes can cause system instability, so back up the key before modifying (right-click the key and choose Export).

Can I use Group Policy to configure LocalDumps?

Yes, Windows Error Reporting settings can be configured via Group Policy under Computer Configuration > Administrative Templates > Windows Components > Windows Error Reporting. However, the LocalDumps key is not exposed in the standard Group Policy editor; you would need to deploy registry settings via a script or preference.