Skip to main content

Crate srcmap_symbolicate

Crate srcmap_symbolicate 

Source
Expand description

Stack trace symbolication using source maps.

Parses stack traces from V8, SpiderMonkey, and JavaScriptCore, resolves each frame through source maps, and produces readable output.

§Examples

use srcmap_symbolicate::{parse_stack_trace, symbolicate, StackFrame};

let stack = "Error: oops\n    at foo (bundle.js:10:5)\n    at bar (bundle.js:20:10)";
let frames = parse_stack_trace(stack);
assert_eq!(frames.len(), 2);
assert_eq!(frames[0].function_name.as_deref(), Some("foo"));

Structs§

ParsedStack
Result of parsing a stack trace: the message line and the parsed frames.
StackFrame
A single parsed stack frame.
SymbolicatedFrame
A symbolicated (resolved) stack frame.
SymbolicatedStack
A full symbolicated stack trace.

Functions§

parse_stack_trace
Parse a stack trace string into individual frames.
parse_stack_trace_full
Parse a stack trace string into message + frames.
resolve_by_debug_id
Resolve a debug ID to a source map from a set of maps indexed by debug ID.
symbolicate
Symbolicate a stack trace using a source map loader function.
symbolicate_batch
Batch symbolicate multiple stack traces against pre-loaded source maps.
to_json
Serialize a symbolicated stack to JSON.