UCE Docs / backtrace_capture

Signature

String backtrace_capture(u32 max_frames = 32, u32 skip_frames = 0)

Parameters

max_frames : maximum number of frames to capture
skip_frames : number of newest frames to omit
return value : formatted backtrace string

Captures and formats a native backtrace for the current call stack.

This helper is for diagnostics. It is used by runtime error reporting paths and can also be useful in local debugging pages.

Example:

Example

String trace = backtrace_capture();
print(trace == "" ? "(empty in the wasm sandbox; populated by the native crash handler)" : trace, "\n");
Output
(empty in the wasm sandbox; populated by the native crash handler)