Question

We have a reporting system that automatically logs and collates stack traces of errors from a live web application compiled with Google Closure.

I have the source maps on the server and I am looking for a simple way to decode the compiled source code locations back into the original source locations either in JavaScript, or preferably with PHP.

Is there anything already out there?

Note that these are stack traces automatically reported from our end users, not browsers that we have direct access to.

Was it helpful?

Solution

stack trace decoding is complicated by the fact that browsers other than Chrome haven't reported column numbers in the stack trace (IE10 may, I haven't check). But for Chrome stack traces, I written decoders a couple of time and they work well.

There is a general Source Map library written in JavaScript available here: https://github.com/mozilla/source-map

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top