I have a client side application written in AngularJS which communicates through API with back end written in PHP. To log JavaScript errors to the server I use approach similar to the one 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 to the actual code traces? (I do have source maps generated)
I'm looking for solution either in PHP or NodeJS.