I have some errors from minified code in production. I have sourcemaps not in production. I'd like to (after the fact) use source maps in a way to convert my stack trace into a human readable stack trace. Has anyone done this before?
I have some errors from minified code in production. I have sourcemaps not in production. I'd like to (after the fact) use source maps in a way to convert my stack trace into a human readable stack trace. Has anyone done this before?
Share Improve this question edited Sep 18, 2015 at 0:42 Parris asked Sep 18, 2015 at 0:35 ParrisParris 18.4k19 gold badges96 silver badges135 bronze badges2 Answers
Reset to default 9I am also doing some research on the same, and e up with some reference. I am sharing those for you:
- https://github./janekp/mapstrace
- https://github./novocaine/sourcemapped-stacktrace
- https://hacks.mozilla/2013/05/piling-to-javascript-and-debugging-with-source-maps/
Raygun developed a Source Maps Validator which let's you upload your source map file.
If you do that, then you can take the line number and column number from the stacktrace of your minified sourcecode to identify the original source which is causing the problem.
Example:
Stacktrace on production (in .min.js
file)
Cannot read property 'split' of undefined at https://app.wire./min/wire-vendor.min.js?2016-06-06-15-36-prod:15:25804
Reading the stacktrace, the line number is 15 and the column number is 25804 (last two parts of the url).
Result: