ama icon indicating copy to clipboard operation
ama copied to clipboard

Prettify Production App Code

Open JSsquare opened this issue 7 years ago • 1 comments

Hey Jon, Let me introduce myself. I am Johnny was watching your videos on Chrome Dev Tools, really interesting. Had a question I thought I will run through

You had mentioned pretty print button do not help if code is uglyfied, what is the best option to debug if the issue happens only on production code. Just trying to know your thoughts on that

JSsquare avatar Oct 09 '18 03:10 JSsquare

Hi @JohnnyPanikulam!

I think you have a few options for production-only issues. Sometimes pretty printing + a debugger will at least be enough to get you started tracking down the issue. For example if the error you see is on a minified variable but in an area of the code you recognize, that may well be enough.

Second you can try either enabling source maps in production temporarily or using an error catching service like Sentry or New Relic that allows you to upload source maps so that way you can see what code is actually being executed.

jkup avatar Oct 19 '18 19:10 jkup