Why it matters
Errors from production arrive as minified stack traces: a function called a, line 1, column 48213. Error trackers can resolve them if you upload your source maps to them, but sometimes all you have is a trace from a log or a user's screenshot, and maps you'd rather not upload anywhere.
This resolver parses the trace in any of the three browser engines' formats, matches each frame's file to a map you drop in, finds the exact mapping for its line and column, and prints the original position, with the enclosing function's real name taken from the map's names. If the map has sourcesContent you also see the code with the failing column marked. Frames from third-party scripts, eval code or a different build are explained rather than silently skipped. Nothing leaves your browser.
How it works
- InputA stack trace and your source maps
- In your browserEach frame looked up in the decoded mappings
- OutputOriginal files, lines, names and code
Where it fits in a designer's workflow
- Plan
- Design
- Build
- Test
- Launch
By the numbers
Show the numbers as a table
| # | Minified frame | Original position | Function | Status |
|---|---|---|---|---|
| 1 | a · app.3f2a9c.js:5:92 | src/basket.js:6:3 | addToBasket | Resolved |
| 2 | HTMLButtonElement.d · app.3f2a9c.js:4:172 | src/checkout/form.js:7:7 | onBuyClick | Resolved |
| 3 | HTMLButtonElement.wrapped · monitor.js:1:2040 | No map for this file |
How to use it
- Paste the stack trace.
- Drop the .map files for the scripts in it.
- Read the resolved trace and the code at each frame.
- Copy the original trace into your bug report.
FAQ
Why does a frame say 'No map for this file'?
No loaded map matches its file name. Third-party scripts rarely publish maps; for your own, drop the .map from the same build.
Why are the lines slightly off?
Usually the map is from a different build than the code that threw. File names with content hashes (app.3f2a9c.js) help make sure they match.
Where do the function names come from?
From the map's names array: the nearest named mapping before the position, in the same original file. If the map has no names, the minified name from the trace is kept.
Which trace formats does it read?
V8 (Chrome, Edge, Node: "at fn (file:line:col)"), SpiderMonkey (Firefox: "fn@file:line:col") and JavaScriptCore (Safari), including async and eval frames.
Are my maps uploaded?
No. They're read in your browser and forgotten when you close the page.