How to pretty print the BacktraceFrame

It seems std::backtrace::BacktraceFrame does not expose any pub fields or any method, I can just print it by {:?}. the output is a mess. Or is there some other way to capture backtrace ? thanks in advance.

You can print a single frame using BacktraceFrameFmt (created using BacktraceFmt::frame)

You can also use {:?} on a Backtrace value, which represents the entire backtrace and not just individual frames. The debug impl for Backtrace shows a nicely formatted backtrace, unlike the debug impl of BacktraceFrame.