Pages

Showing posts with label chrome. Show all posts
Showing posts with label chrome. Show all posts

Thursday, March 8, 2012

Debugging Dojo with Chrome

As a web developer I spend many hours working with javascript libraries like dojo. Unfortunately, in many cases the javascript in these libraries is compressed making it very difficult to trace in a debug session.

Chrome is Your New Best Friend
Google's chrome developer tools has many bells and whistles, some of which I've only discovered in the last week. One feature that I think is worthy of mention is the pretty print button, tucked away at the bottom of the page in the status bar.


Click on the button and dojo.js goes from this:


to this:


Some of the variables are still compressed, but now the code becomes legible and breakpoints can be added with ease.

Yes, it also works with JQuery.