Wednesday, September 18, 2013

How to Debug Minified JavaScript

I recently wrote a blog post about how to control minification per request. However, that strategy will not help you if the minification itself is causing a bug.

Fortunately Chrome has an absolutely amazing set of developer tools that can help you debug any script, even one that have been minified! Just follow these very simple steps:

  1. Navigate to the page in Chrome.
  2. Launch the developers tools (by pressing F12).
  3. Open the JavaScript file in the Sources tab.
  4. Activate the amazing "Pretty print" feature.
  5. Debug those scripts!

Shout it

Enjoy,
Tom

No comments:

Post a Comment

Real Time Web Analytics