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§
- Parsed
Stack - Result of parsing a stack trace: the message line and the parsed frames.
- Stack
Frame - A single parsed stack frame.
- Symbolicated
Frame - A symbolicated (resolved) stack frame.
- Symbolicated
Stack - 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.