StackTrace ≅
How to automatically generate a stacktrace when my program crashes - SO
Backward-cpp
Header only - a beautiful stack trace pretty printer for C++.
- can be installed via meson or conan or directly
This one is very easy to setup
And well suited for VScode code runner one liner compiler command:
- define a backend for stackunwiding
- include
backward.hpp
if you are using the API directly - modify
backward.cpp
to use the same backend - if you want automated trace dump on SIGNAL
All setup! Now compile with
Optionally add that in the place you are need to call the API directly (make sure the backend is the same)
This would be the .run config
And you will get this automatically
Cpptrace
A simple, portable, and self-contained C++ stacktrace library supporting C++11 and greater on Linux
- can be installed via conan
see also
- std::basic_stacktrace (c++23)
- de-boostified version of libstacktrace.
- symbolizer (folly) - older than boost
Shortest implementation with glib
Written on December 8, 2022, Last update on October 17, 2024
debug-c++
stacktrace
single-header
codingame
vscode