<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="making-windows-dumps">
      </a>
      7.9.1.3 Using WER with PDB to create a Windows crashdump
     </h4>
    </div>
   </div>
  </div>
  <p>
   Program Database files (with suffix
   <code class="filename">
    pdb
   </code>
   )
        are included in the
   <span class="bold">
    <strong>
     ZIP Archive Debug
        Binaries &amp; Test Suite
    </strong>
   </span>
   distribution of MySQL.
        These files provide information for debugging your MySQL
        installation in the event of a problem. This is a separate
        download from the standard MSI or Zip file.
  </p>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    The PDB files are available in a separate file labeled "ZIP
          Archive Debug Binaries &amp; Test Suite".
   </p>
  </div>
  <p>
   The PDB file contains more detailed information about
   <code class="literal">
    mysqld
   </code>
   and other tools that enables more
        detailed trace and dump files to be created. You can use these
        with
   <span class="command">
    <strong>
     WinDbg
    </strong>
   </span>
   or Visual Studio to debug
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   .
  </p>
  <p>
   For more information on PDB files and the debugging options
        available, see
   <a class="ulink" href="https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/" target="_blank">
    Debugging
        Tools for Windows
   </a>
   .
  </p>
  <p>
   To use WinDbg, either install the full Windows Driver Kit (WDK)
        or install the standalone version.
  </p>
  <div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Important
   </div>
   <p>
    The
    <code class="filename">
     .exe
    </code>
    and
    <code class="filename">
     .pdb
    </code>
    files must be an exact match (both version number and MySQL
          server edition); otherwise, or WinDBG complains while
          attempting to load the symbols.
   </p>
  </div>
  <div class="orderedlist">
   <ol class="orderedlist" type="1">
    <li class="listitem">
     <p>
      To generate a minidump
      <code class="filename">
       mysqld.dmp
      </code>
      ,
            enable the
      <a class="link" href="server-options.html#option_mysqld_core-file">
       <code class="option">
        core-file
       </code>
      </a>
      option
            under the [mysqld] section in
      <code class="filename">
       my.ini
      </code>
      .
            Restart the MySQL server after making these changes.
     </p>
    </li>
    <li class="listitem">
     <p>
      Create a directory to store the generated files, such as
      <code class="filename">
       c:\symbols
      </code>
     </p>
    </li>
    <li class="listitem">
     <p>
      Determine the path to your
      <span class="command">
       <strong>
        windbg.exe
       </strong>
      </span>
      executable using the Find GUI or from the command line, for
            example:
      <code class="literal">
       dir /s /b windbg.exe
      </code>
      -- a common
            default is
      <span class="emphasis">
       <em>
        C:\Program Files\Debugging Tools for
            Windows (x64)\windbg.exe
       </em>
      </span>
     </p>
    </li>
    <li class="listitem">
     <p>
      Launch
      <code class="filename">
       windbg.exe
      </code>
      giving it the paths
            to
      <code class="filename">
       mysqld.exe
      </code>
      ,
      <code class="filename">
       mysqld.pdb
      </code>
      ,
      <code class="filename">
       mysqld.dmp
      </code>
      , and the source code.
            Alternatively, pass in each path from the WinDbg GUI. For
            example:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa55036389"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">windbg<span class="token punctuation">.</span>exe <span class="token property">-i</span> "C<span class="token punctuation">:</span>\mysql-8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>3-winx64\bin\"^
 <span class="token property">-z</span> <span class="token atrule">"C:\mysql-8.4.3-winx64\data\mysqld.dmp"</span>^
 <span class="token property">-srcpath</span> <span class="token atrule">"E:\ade\mysql_archives\8.4\8.4.3\mysql-8.4.3"</span>^
 <span class="token property">-y</span> <span class="token atrule">"C:\mysql-8.4.3-winx64\bin;SRV*c:\symbols*http://msdl.microsoft.com/download/symbols"</span>^
 <span class="token property">-v</span> <span class="token property">-n</span> <span class="token property">-c</span> <span class="token atrule">"!analyze -vvvvv"</span></code></pre>
     </div>
     <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
      <div class="admon-title">
       Note
      </div>
      <p>
       The
       <code class="literal">
        ^
       </code>
       character and newline are removed
              by the Windows command line processor, so be sure the
              spaces remain intact.
      </p>
     </div>
    </li>
   </ol>
  </div>
 </div>
 <br/>
</div>
