I am in the process of implementing a feature on a Python webserver which automatically fetches, concatenates, minifies, caches and serves Javascript files (including external ones) on first request so that users can get the benefits of minification without us having to manually run any of our Javascript through a minifier when we push changes.
However, the trouble is that our choice of minifier (slimit) introduces a syntax error somewhere in the Javascript, and (naturally) removes all newlines.
Simply knowing that there is an Unexpected token ILLEGAL somewhere in our hundreds of thousands of characters of minified Javascript is unhelpful when trying to figure out the cause of this and find a workaround.
So:
1) Is there a way, in (any) browser, that I can automatically 'prettify' Javascript when viewing it in the Developer Tools section of the browser, inserting line breaks after statements, and showing errors on the lines where they occur?
2) Alternatively, is there a clever hack I can use before returning the minified Javascript on our testing server to insert newlines at the end of statements wherever possible, in order to make it easier to find the location of the syntax error when viewing in Developer Tools?
3) Alternatively, is there some other obvious solution to my problem that I am missing?
;at the end of a line.