[Python-Dev] How to debug python crashes
Steve.Dower at microsoft.com
Wed May 15 23:00:37 CEST 2013
> From: Catalin Iacob
> Hi Philippe,
> I don't have access to VS right now but out of my head what you need
> to do is roughly outlined below.
> On Tue, May 14, 2013 at 5:29 PM, Philippe Fremy <phil at freehackers.org>
> > But what's the reason for releasing them ? If you need to recompile
> > Python to use them, that would be strange because they are generated as
> > part of the compilation process anyway.
> They can indeed be used like this:
> You should launch the python.exe process that is going to crash,
> attach to it with the Visual Studio debugger and then reproduce the
> crash. This should drop you in the debugger.
> Once you're in the debugger and python.exe is stopped at the point of
> the crash you should see the stack trace of each thread in a VS
> window, the stacktrace will probably have lots of entries of the form
> python27.dll!<hex-adress> (no function names because there VS doesn't
> know where to find the PDB files). If you right click one of those
> entries there's an option named "Symbol load information" or similar,
> this will show a window from which you can make VS ask you where on
> disk do you have PDB files. You then tell VS where to find
> python27.pdb and then the stacktrace entries should automatically get
> function names.
Copying the .pdb files to the same directories as the matching DLL/EXE files (which may be C:\Windows\System32 or C:\Windows\SysWOW64 for python27.dll) should also make this work. VS will always look next to the executable file.
More information about the Python-Dev