comparison runtime/doc/debug.txt @ 857:b933657f7c9d

updated for version 7.0g01
author vimboss
date Tue, 02 May 2006 22:08:30 +0000
parents 8cd729851562
children 4bac29d27e2f
comparison
equal deleted inserted replaced
856:8cd729851562 857:b933657f7c9d
1 *debug.txt* For Vim version 7.0g. Last change: 2006 Apr 30 1 *debug.txt* For Vim version 7.0g. Last change: 2006 May 01
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
45 45
46 46
47 GENERIC ~ 47 GENERIC ~
48 48
49 You must obtain the debugger symbols (PDB) file for your executable: gvim.pdb 49 You must obtain the debugger symbols (PDB) file for your executable: gvim.pdb
50 for gvim.exe, or vim.pdb for vim.exe. It should be available from the same 50 for gvim.exe, or vim.pdb for vim.exe. The PDB should be available from the
51 place that you obtained the executable. Be sure to use the PDB that matches 51 same place that you obtained the executable. Be sure to use the PDB that
52 the EXE (same date). 52 matches the EXE (same date).
53 53
54 If you built the executable yourself with the Microsoft Visual C++ compiler, 54 If you built the executable yourself with the Microsoft Visual C++ compiler,
55 then the PDB was built with the EXE. 55 then the PDB was built with the EXE.
56 56
57 Alternatively, if you have the source files, you can import Make_ivc.mak into 57 Alternatively, if you have the source files, you can import Make_ivc.mak into
63 For other compilers, you should always use the corresponding debugger: TD for 63 For other compilers, you should always use the corresponding debugger: TD for
64 a Vim executable compiled with the Borland compiler; gdb (see above 64 a Vim executable compiled with the Borland compiler; gdb (see above
65 |debug-gcc|) for the Cygwin and MinGW compilers. 65 |debug-gcc|) for the Cygwin and MinGW compilers.
66 66
67 67
68 Debugging Vim crashes with Visual Studio 2005/Visual C++ 2005 Express ~ 68 *debug-vs2005*
69 2.2 Debugging Vim crashes with Visual Studio 2005/Visual C++ 2005 Express ~
69 70
70 First launch vim.exe or gvim.exe and then launch Visual Studio. (If you don't 71 First launch vim.exe or gvim.exe and then launch Visual Studio. (If you don't
71 have Visual Studio, follow the instructions in src/INSTALLpc.txt to obtain a 72 have Visual Studio, follow the instructions at |get-ms-debuggers| to obtain a
72 free copy of Visual C++ 2005 Express Edition.) 73 free copy of Visual C++ 2005 Express Edition.)
73 74
74 On the Tools menu, click Attach to Process. Choose the Vim process. 75 On the Tools menu, click Attach to Process. Choose the Vim process.
75 76
76 In Vim, reproduce the crash. A dialog will appear in Visual Studio, telling 77 In Vim, reproduce the crash. A dialog will appear in Visual Studio, telling
92 at ":help bug-reports". Paste the call stack into the bug report. 93 at ":help bug-reports". Paste the call stack into the bug report.
93 94
94 If you have a non-free version of Visual Studio, you can save a minidump via 95 If you have a non-free version of Visual Studio, you can save a minidump via
95 the Debug menu and send it with the bug report. A minidump is a small file 96 the Debug menu and send it with the bug report. A minidump is a small file
96 (<100KB), which contains information about the state of your process. 97 (<100KB), which contains information about the state of your process.
98 Visual C++ 2005 Express Edition cannot save minidumps and it cannot be
99 installed as a just-in-time debugger. Use WinDbg, |debug-windbg|, if you
100 need to save minidumps or you want a just-in-time (postmortem) debugger.
97 101
102 *debug-windbg*
103 2.3 Debugging Vim crashes with WinDbg ~
98 104
99 Debugging Vim with Debugging Tools ~ 105 See |get-ms-debuggers| to obtain a copy of WinDbg.
100 106
101 You can download the Microsoft Visual C++ Toolkit from 107 As with the Visual Studio IDE, you can attach WinDbg to a running Vim process.
102 http://msdn.microsoft.com/visualc/vctoolkit2003/ 108 You can also have your system automatically invoke WinDbg as a postmortem
103 This contains the command-line tools, but not the Visual Studio IDE. 109 debugger. To set WinDbg as your postmortem debugger, run "windbg -I".
104 110
105 The Debugging Tools for Windows can be downloaded from 111 To attach WinDbg to a running Vim process, launch WinDbg. On the File menu,
112 choose Attach to a Process. Select the Vim process and click OK.
113
114 At this point, choose Symbol File Path on the File menu, and add the folder
115 containing your Vim PDB to the sympath. If you have Vim source available,
116 use Source File Path on the File menu. You can now open source files in WinDbg
117 and set breakpoints, if you like. Reproduce your crash. WinDbg should open the
118 source file at the point of the crash. Using the View menu, you can examine
119 the call stack, local variables, watch windows, and so on.
120
121 If WinDbg is your postmortem debugger, you do not need to attach WinDbg to
122 your Vim process. Simply reproduce the crash and WinDbg will launch
123 automatically. As above, set the Symbol File Path and the Source File Path.
124
125 To save a minidump, type the following at the WinDbg command line: >
126 .dump vim.dmp
127 <
128 *debug-minidump*
129 2.4 Opening a Minidump ~
130
131 If you have a minidump file, you can open it in Visual Studio or in WinDbg.
132
133 In Visual Studio 2005: on the File menu, choose Open, then Project/Solution.
134 Navigate to the .dmp file and open it. Now press F5 to invoke the debugger.
135 Follow the instructions in |debug-vs2005| to set the Symbol File Path.
136
137 In WinDbg: choose Open Crash Dump on the File menu. Follow the instructions in
138 |debug-windbg| to set the Symbol File Path.
139
140 *get-ms-debuggers*
141 2.5 Obtaining Microsoft Debugging Tools ~
142
143 The Debugging Tools for Windows (including WinDbg) can be downloaded from
106 http://www.microsoft.com/whdc/devtools/debugging/default.mspx 144 http://www.microsoft.com/whdc/devtools/debugging/default.mspx
107 This includes the WinDbg debugger. 145 This includes the WinDbg debugger.
108 146
147 Visual C++ 2005 Express Edition can be downloaded for free from:
148 http://msdn.microsoft.com/vstudio/express/visualC/default.aspx
109 149
110 ========================================================================= 150 =========================================================================
111 vim:tw=78:ts=8:ft=help:norl: 151 vim:tw=78:ts=8:ft=help:norl: