Windows C++应用程序崩溃
我有一个 Windows C++ 应用程序,它有时会在用户计算机上崩溃。我没有编写该应用程序,它没有自己的日志记录。是否有一个我可以使用的工具/实用程序能够在应用程序退出时记录一些有用的信息(例如发生崩溃的文件和行号)?最终用户的组件没有 Visual Studio。
I have a Windows C++ app that crashes on user computers from time to time. I didnt write the app and it doesnt have its own logging. Is there a tool / utility I could use that is able to log some useful information when the application exits (e.g. the file and line number where the crash occurred)? The end user's component does not have Visual Studio.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
仅如果代码是在包含调试信息的情况下构建的,则可能出现这种情况。如果您的用户准备安装 VC++ Express,他们可以在崩溃后使用其调试器附加到进程,但如果没有源代码,他们只会看到汇编代码,并且没有调试信息,在任何情况下都可能提供有限的帮助。
That would be possible only if the code were built with debug information included. If your users are prepared to install VC++ Express, they could attach to the process with its debugger after the crash, but without the source they will simply see assembler code, and without debug information that may be of limited help in any case.
您可以使用 BugTrap 来捕获未处理的异常并通过电子邮件或其他方式报告它们。设置非常简单。唯一的困难是为小型转储正确设置 *.pdb *.dll *.exe。
You can use BugTrap which catches unhandled exceptions and reports them via email or other means. The setup is pretty simple. The only difficulty will be to correctly setup the *.pdb *.dll *.exe for the minidump.
通过在程序中添加转储生成,您可以使用事后调试。故障转储由 MiniDumpWriteDump 函数创建。该转储可以发送到开发人员计算机并进行调试。有关此内容的更多信息,请访问:
http://www.codeproject.com/KB/debug/postmortemdebug_standalone1 .aspx
By adding dump generating to the program, you can use post-mortem debugging. Crash dump is created by MiniDumpWriteDump function. This dump can be sent to developer computer and debugged. More about this here:
http://www.codeproject.com/KB/debug/postmortemdebug_standalone1.aspx