Skip to content

captureStackTrace

captureStackTrace(options?): StackTrace

Defined in: packages/core/src/error/capture-stack-trace.ts:37

Capture the stack trace of the caller.

Uses V8’s Error.captureStackTrace when available (Node.js, Chrome) and falls back to parsing new Error().stack on other engines. The fallback filters frames by function name, which is best-effort in minified code.

CaptureStackTraceOptions

StackTrace

An array of strings representing the stack trace, or [] if unavailable