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
source to share
No one has answered this question yet
See similar questions:
or similar: