-
Download ProcDump
- ProcDump is a Microsoft Sysinternals command-line utility for creating memory dumps / crash dumps.
-
Run the following command to start capturing a memory dump anytime an application crashes:
mkdir C:\MemoryDumps
procdump.exe -accepteula -ma -i C:\MemoryDumps
- Run the following command to stop capturing a memory dump anytime an application crashes:
procdump.exe -u
- Copy the dump file to your machine
- Zip or 7zip the file before transferring to your machine as the files are very large
- Also, consider uploading the file via OneDrive as a faster way to copy the file to your machine
- In Visual Studio, be sure you have reverted your code back to the same version of the app that crashed and re-build the solution in release mode
- Be sure to place the re-built binaries in the exact same directory on your machine so that Visual Studio can find the .pdb files
- In Visual Studio, open the .dmp file and click "Debug with Managed Only"
- If a "Just My Code Warning" dialog opens, select "Disable Just My Code and Continue"
- If a Stack Overflow error occurred, it will immediately breakpoint on the exact line that caused the Stack Overflow
- By debugging the memory dump, you can see all active threads, double click on any thread to see the code and all variables loaded