Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
129
rated 0 times [  133] [ 4]  / answers: 1 / hits: 33479  / 8 Years ago, thu, july 14, 2016, 12:00:00

I've got problem debugging minified JS on production server.


While you can't catch some errors on your machine while testing dev/prod servers, there's an opportunity to send some frontend errors and exceptions from users to a special log.


When JS files are minified, debugging this code becomes a hell.

What are the best practices in performing such work?


More From » debugging

 Answers
11

So, after some time, we've continued to try and resolve damn trouble and we've stumbled upon this library that allows you to map your stack to unminified version of build.



https://github.com/mozilla/source-map



We needed this to embed to our internal system that collects error reports.
There are also ready solutions across the web if don't need your own like we do:



https://raygun.com/sourcemaps



https://sourcemaps.info/


[#61373] Tuesday, July 12, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dorab

Total Points: 22
Total Questions: 106
Total Answers: 99

Location: El Salvador
Member since Fri, May 8, 2020
4 Years ago
;