Search code examples
pythonwinapistack-tracecrash-dumps

Creating a minidump in a Python application (Windows)


I'm working on a Python application. Sometimes the interpreter crashes when in a third party C++ DLL.

I'm thinking about writing a Python extension that installs a handler for unhandled structured exceptions (Windows) in order to write a minidump to the disk and log the stack trace of every Python thread.

Two questions:

  1. Does a Python extension with a similar purpose already exist? According to my own Google search, nothing seems to be publicly available, but maybe I didn't search enough.

  2. Is it feasible to implement something like this? (I'm experienced in C++ and Windows programming, but have never implemented a Python extension...)


Solution

  • Check out FaultHandler on PyPI.