Home Explore Blog CI



neovim

2nd chunk of `runtime/doc/debug.txt`
3201dc9b85732631af9708999b542fc4128ef05f190f959c000000010000085d
 report.


3.1 GENERIC ~

You must obtain the debugger symbols (PDB) file for your executable: gvim.pdb
for gvim.exe, or vim.pdb for vim.exe. The PDB should be available from the
same place that you obtained the executable. Be sure to use the PDB that
matches the EXE (same date).

If you built the executable yourself with the Microsoft Visual C++ compiler,
then the PDB was built with the EXE.

If you have Visual Studio, use that instead of the VC Toolkit and WinDbg.

For other compilers, you should always use the corresponding debugger: gdb
(see above |debug-gcc|) for the Cygwin and MinGW compilers.


								*debug-vs2005*
3.2 Debugging Vim crashes with Visual Studio 2005/Visual C++ 2005 Express ~

First launch vim.exe or gvim.exe and then launch Visual Studio.  (If you don't
have Visual Studio, follow the instructions at |get-ms-debuggers| to obtain a
free copy of Visual C++ 2005 Express Edition.)

On the Tools menu, click Attach to Process.  Choose the Vim process.

In Vim, reproduce the crash.  A dialog will appear in Visual Studio, telling
you about the unhandled exception in the Vim process.  Click Break to break
into the process.

Visual Studio will pop up another dialog, telling you that no symbols are
loaded and that the source code cannot be displayed.  Click OK.

Several windows will open.  Right-click in the Call Stack window.  Choose Load
Symbols.  The Find Symbols dialog will open, looking for (g)vim.pdb.  Navigate
to the directory where you have the PDB file and click Open.

At this point, you should have a full call stack with vim function names and
line numbers.  Double-click one of the lines and the Find Source dialog will
appear.  Navigate to the directory where the Vim source is (if you have it.)

If you don't know how to debug this any further, follow the instructions
at ":help bug-report".  Paste the call stack into the bug report.

If you have a non-free version of Visual Studio, you can save a minidump via
the Debug menu and send it with the bug report.  A minidump is a small file
(<100KB), which contains information about the state of your process.
Visual C++ 2005 Express Edition

Title: Windows Bug Reporting and Debugging with Visual Studio
Summary
This section describes how to report bugs in the Windows version of Vim and how to debug Vim crashes using Visual Studio, specifically Visual Studio 2005/Visual C++ 2005 Express. It details the process of obtaining debugger symbols (PDB files), attaching Visual Studio to the Vim process, reproducing the crash, loading symbols, finding the source code, and obtaining the call stack for the bug report.