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
Add a ment  | 

1 Answer 1

Reset to default 8

I 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