百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

Crashlogs

> 编程语言
开源

在 C++ 中程序崩溃时输出堆栈跟踪的简单方法,使用新的 C++23 <stacktrace> 头文件

193 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

在 C++ 中程序崩溃时输出堆栈跟踪的简单方法,使用新的 C++23 <stacktrace> 头文件

Crashlogs

A simple way to output stack traces when a program crashes in C++, using the new C++23 <stacktrace> header currently windows-only, but if anyone wants to add mac or linux support I'll merge it in

usage: include the files in your project, then call
glaiel::crashlogs::begin_monitoring();
to enable crash handling (probably do this at the start of your program)

when the program crashes, it will save a timestamped stack trace to the folder specified with
glaiel::crashlogs::set_crashlog_folder(folder_path);

some additional customizability and callbacks are documented in the header file

note: the stack trace outputted will include a bunch of error handling stuff at the top. It would be nice to skip printing the first X stack trace entries, but how many to skip seems kinda dependent on optimization settings and which condition triggered the error handler, so I did not bother with that yet.

Testing

TestTool.cpp is a very simple command line tool to test a few different cases.
It will enable the monitoring and delibrately crash so you can manually verify the handler works.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言