MATLAB: How to generate a native crash dump for MATLAB in Windows

crashlogsMATLABnativeundocumentedwindows

How do I generate a native crash dump for MATLAB in Windows?

Best Answer

To create a native crash dump for the MATLAB process on a Windows Machine, do the following:
  1. Open up a command prompt
  2. “set MW_CRASH_MODE=wait”
  3. Open MATLAB from the same command prompt
  4. Perform the steps that cause MATLAB to crash. When MATLAB would otherwise crash, it will hang instead.
  5. Right-click on MATLAB in Task Manager and obtain a native crash dump
  6. Use Task Manager to end the MATLAB process
This will create a full memory dump, which contains a lot of information that can be used to help troubleshoot the crash.
Note that this usage of MW_CRASH_MODE is undocumented, and may change at any time.