How do I decode the JavaScript stack trace code on the server?

I have a client application written in AngularJS that communicates via a writeback API written in PHP. To log JavaScript errors to the server, I use an approach similar to that described by Ben Nadel ( http://www.bennadel.com/blog/2542-logging-client-side-errors-with-angularjs-and-stacktrace-js.htm ) ...

The problem is that all my JS code is minified, so my stack traces logged to the server look like this:

  TypeError: undefined is not a function : new <anonymous>@http://exmaple.com/assets/js/dist/all.min.js?v=1409233767682885224:11:21574
  e@http://exmaple.com/assets/js/dist/all.min.js?v=1409233767682885224:2:295
  Object.f [as instantiate]@http://exmaple.com/assets/js/dist/all.min.js?v=1409233767682885224:2:410
  {anonymous}()@http://exmaple.com/assets/js/dist/all.min.js?v=1409233767682885224:2:18043
  link@http://exmaple.com/assets/js/dist/all.min.js?v=1409233767682885224:5:14050
  q@http://exmaple.com/assets/js/dist/all.min.js?v=1409233767682885224:2:10396
  h@http://exmaple.com/assets/js/dist/all.min.js?v=1409233767682885224:2:6417
  {anonymous}()@http://exmaple.com/assets/js/dist/all.min.js?v=1409233767682885224:2:6040
  E.d@http://exmaple.com/assets/js/dist/all.min.js?v=1409233767682885224:2:6889
  n@http://exmaple.com/assets/js/dist/all.min.js?v=1409233767682885224:2:8873

      

Is there a way to decode them into actual code traces? (I have source maps)

I am looking for a solution either in PHP or NodeJS.

+3
javascript stack-trace node.js php source-maps


source to share


No one has answered this question yet

See similar questions:

26
How can I take the minified javascript stack trace and run it against the original map to get the correct error?

or similar:

7649
How does JavaScript blocking work?
7494
How can I remove a specific element from an array in JavaScript?
7432
How to check if a string contains a substring in JavaScript?
5722
How can I remove a property from a JavaScript object?
4829
How do I include a JavaScript file in another JavaScript file?
3999
How do I replace all occurrences of a string?
3998
How to validate an email address in JavaScript
3796
How do you get the timestamp in JavaScript?
1415
How do I convert the stack trace to a string?
925
Get current stack trace in Java



All Articles
Loading...
X
Show
Funny
Dev
Pics