admin管理员组文章数量:1293754
I'm logging javascript errors from my site, but the files are minimized so I don't get meaningful line numbers. I do have source maps, however.
Is there a service, script, npm module, or anything that can help me "translate" the line numbers from the minified versions into something useful?
I'm logging javascript errors from my site, but the files are minimized so I don't get meaningful line numbers. I do have source maps, however.
Is there a service, script, npm module, or anything that can help me "translate" the line numbers from the minified versions into something useful?
Share asked Jul 29, 2014 at 19:11 blockheadblockhead 9,7053 gold badges46 silver badges69 bronze badges 4- Do you have a test/integration environment with non-minified JS that you can reproduce those errors in? – admdrew Commented Jul 29, 2014 at 19:19
- Of course I do, but a basic part of error logging is reading stacktraces...do you not agree? – blockhead Commented Jul 29, 2014 at 19:27
- I'm just wondering if what you need is required for production, given the 'answer' is just beautified JS. – admdrew Commented Jul 29, 2014 at 19:28
- I have a system in production, and a stacktrace from a bug on production. Obviously I need to be able to reproduce it. I'm asking how I can effectively read my stacktrace. – blockhead Commented Jul 29, 2014 at 19:37
1 Answer
Reset to default 8I have found the answer using this npm module:
https://www.npmjs/package/source-map
Edit Feb 1st, 2015
Found the following project which handles this: https://github./epeli/source-map-peek
本文标签: javascriptHow can I get the original line number and symbol from a sourcemapStack Overflow
版权声明:本文标题:javascript - How can I get the original line number and symbol from a sourcemap - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741587061a2386907.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论