Using WER with PDB to create a Windows crashdump

Program Database (PDB) files (with file name extension pdb) are included in ZIP Archive distributions (but not MSI distributions) of MySQL. These files provide information for debugging your MySQL installation in the event of a problem.


As of MySQL 5.7.6, the PDB files are available in a separate file labeled "ZIP Archive Debug Binaries & Test Suite".

The PDB file contains more detailed information about mysqld and other tools that enables more detailed trace and dump files to be created. You can use these with WinDbg or Visual Studio to debug mysqld.


The older Dr. Watson debugging tool was removed in Microsoft Vista, with WinDbg being a common alternative. Both methods are documented here.

For more information on PDB files, see Microsoft Knowledge Base Article 121366. For more information on the debugging options available, see Debugging Tools for Windows.

Using WinDbg

To use WinDbg, either install the full Windows Driver Kit (WDK) or install the standalone version.


The .exe and .pbd files must be an exact match (both version number and MySQL server edition) or WinDBG will complain while attempting to load the symbols.

  1. To generate a minidump mysqld.dmp, enable the core-file option under the [mysqld] section in my.ini. Restart the MySQL server after making these changes.

  2. Create a directory to store the generated files, such as c:\symbols

  3. Determine the path to your windbg.exe executable using the Find GUI or from the command line, for example: dir /s /b windbg.exe -- a common default is C:\Program Files\Debugging Tools for Windows (x64)\windbg.exe

  4. Launch windbg.exe giving it the paths to mysqld.exe, mysqld.pdb, mysqld.dmp, and the source code. Alternatively, pass in each path from the WinDbg GUI. For example:

    windbg.exe -i "C:\mysql-5.5.48-winx64\bin\"^
     -z "C:\mysql-5.5.48-winx64\data\mysqld.dmp"^
     -srcpath "E:\ade\mysql_archives\5.5\5.5.48\mysql-5.5.48"^ 
     -y "C:\mysql-5.5.48-winx64\bin;SRV*c:\symbols*http://msdl.microsoft.com/download/symbols"^
     -v -n -c "!analyze -vvvvv"

    The ^ character and newline are removed by the Windows command line processor, so be sure the spaces remain intact.

Using Dr. Watson

To generate a crash file using Dr Watson (for Microsoft Vista and below), follow these steps:

  1. Start Dr Watson by running drwtsn32.exe interactively using the -i option:

    C:\> drwtsn32 -i
  2. Set the Log File Path to the directory where you want to store trace files.

  3. Make sure Dump All Thread Contexts and Append To Existing Log File.

  4. Uncheck Dump Symbol Table, Visual Notification, Sound Notification and Create Crash Dump File.

  5. Set the Number of Instructions to a suitable value to capture enough calls in the stacktrace. A value of at 25 should be enough.

Note that the file generated can become very large.