To build a fast and responsive web application we minified the JavaScript files. In other cases, such as JavaScript plugins, jQuery framework or even on demand code library are minified to be used directly. While this is good for performance, one of the challenges of working with the minified version of file is, it becomes really hard to read and debug. Because they are not properly formatted and aligned.
If you are using IE11, with the developer toolbar, you can easily form deminify the minified script and debug or read the code very easily.
Step 1 : From the IE Developer Toolbar, select the “Debugger Tool” and then select the minified file from the list of loaded JavaScript files.
Step 2 : Consider, you have selected “jquery.js”, Minified code will look as shown in below.
Now the above code is hard to read or understand. Even if you want to debug it, you will have a tough time to set a breakpoint.
Additional Read : Turning Your Websites into 3D View | Firefox 3D DOM Viewer
Let’s have a look to how to make it formatted.
Step 3 : select “Pretty Print” button from the tool bar.
With this you will find all the code arranged and formatted as shown in below image.
Well, now the minified code is very much clear and organized to work with.
P.S : This is not a new feature of IE11, You can use IE10, 9, where you can find “Format JavaScript”option under the “toolbox” icon. This same feature is also available for other browse toolbar such as chrome, safari, opera, also for Firefox, you can use Javascript Deminifier addons.
Pingback: How to open Browser compatibility mode in IE 11 ?