Stack traces with sourcemap support

Hi. I’m trying to tidy up reporting of javascript errors. The stack trace returned within meteor does not process the error trace with a sourcemap if it is present. (I know the dev tools console does show this but would like to have the processed version available within the application for error reporting). As meteor compresses everything into a bundle, this stack trace is often meaningless without the sourcemap lookup.

Idealy, I would like a function/method that would take the unprocessed stack trace, load the relevant sourcemap and return the prettified stack trace.

Has anyone already tackled this problem and if so, could they share their solution?

I am aware that I maybe don’t want to do this in production as anyone can see the code, but as this is an intranet app, this is not a particular concern.

I have seen a couple of issues related to this. Try a search on the Meteor GitHub repository.

Had a look but impossible to find anything. Stack trace or source map turn up many many issues and I can’t think of anything more specific to search for.

Let us know if you find something, for I think this would be instrumental for fixing errors. As of right now, stack traces are obviously unusable in production. Error handling is usually the orphaned child in most applications, as if it was something lowly und unpleasant, so it doesn’t receive due attention. It seems to be the case in Meteor too.