How can I take a minified javascript stack trace and run it against a source map to get the proper error?

后端 未结 5 1400
遇见更好的自我
遇见更好的自我 2020-12-13 17:46

On our production server, I have minified javascript published and I\'m not including a map file with it, because I don\'t want the user to be able to understand what\'s hap

5条回答
  •  青春惊慌失措
    2020-12-13 18:34

    I figured there was no super simple tool for converting a minified stack trace into a readable one using a source map (without having to use a web service), so I created a tool for it:

    https://github.com/mifi/stacktracify

    Install and use it as follows:

    npm install -g stacktracify
    

    Now copy a minified stacktrace to your clipboard - then run:

    stacktracify /path/to/js.map
    

提交回复
热议问题