在 Python 应用程序中创建小型转储 (Windows)
我正在开发一个 Python 应用程序。有时,解释器在第三方 C++ DLL 中会崩溃。
我正在考虑编写一个 Python 扩展,为未处理的结构化异常(Windows)安装一个处理程序,以便将小型转储写入磁盘并记录每个 Python 线程的堆栈跟踪。
两个问题:
是否已经存在具有类似用途的 Python 扩展?根据我自己的 Google 搜索,似乎没有任何内容是公开的,但也许我搜索得不够。
实施这样的事情是否可行? (我有 C++ 和 Windows 编程经验,但从未实现过 Python 扩展...)
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:
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.
Is it feasible to implement something like this? (I'm experienced in C++ and Windows programming, but have never implemented a Python extension...)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看 PyPI 上的 FaultHandler。
Check out FaultHandler on PyPI.
我最近想做同样的事情,并创建了 minidumper 来做到这一点,并写了一篇小文章这里。
I recently wanted to do the same thing and created minidumper to do so, and did a small write-up of it here.