Set up forensic debugging for Unity
Set up Visual Studio or WinDbg to debug your application or Editor after a crash occurs (forensic debugging).
Read time 2 minutesLast updated 10 days ago
Learn how to set up Visual Studio or WinDbg to debug your application or Unity Editor after it discovers an issue or crashes. This type of debugging is called forensic debugging.
Occasionally, an application doesn't crash despite having the debugger attached, or it crashes on a remote device where the debugger isn't available. In such cases, you can get useful information from the dump file the debugger creates. This information covers how to set up the debugger to create a dump file.
If you want to debug as the application runs instead, refer to Set up live debugging for Unity.
Force applications to create a dump file
To make your applications produce a dump file when they run into an issue:
- Open the Windows registry.
- Navigate to .
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting - Create a key (folder) if one doesn't exist.
LocalDumps - Create a new String Value called whose value is the fully qualified path where you want to store your dump files. For example,
DumpFolder.C:\Temp - Create a new DWORD called and set its value to
DumpCount.00000010 - Create a new DWORD called and set its value to
DumpType.00000002 - Launch the application via the Windows Standalone or Universal Windows executable.
- Reproduce the crash.
The application creates the dump file in the folder you specified earlier. You can open the dump file with your preferred debugging tool, such as Visual Studio or WinDbg.