Fiddler2 - JavaScript Beautifier Plugin

Update: download first alpha version of the PrettyPrint plugin for Fiddler2.

I think everybody is doing this: you open a Web page and see some nice and tricky effects. Next you start Fiddler2 (which is my favorite tool for Web developers!!) and have a more detailed look in the content transferred from server to the client. Fiddler2 includes an automatic encoding removal which means that you can view text files without having to unzip to content first.

During the last years more and more Web developers have obfuscated their JavaScript files. Have a look following short example:

JsonRequestBuilder=function(b,c){var dynamicScript=new 
DynamicScript(b,c);JsonRequest=function(g,h,j,k,l,b,c){var 
responseFunc=h;var callback=k;this.Callback=function(j,m){var
 readyState=m;var responseObject=null;try{if(m=="loaded"||m==
"complete"){responseObject=eval(responseFunc+"();");eval
("window."+responseFunc+" = null;");}}catch(e){readyState=
"error";}finally{callbac(responseObject,j,readyState);}};this.
rawRequest=dynamicScript.CreateReques(g,j,this.Callback,l,b,c);
this.Execute=function(){this.rawRequest.Execute();};this.
Abort=function(){this.rawRequest.Abort();};};function n
// [...]

Well, would't it be great if obfuscated JavaScript code would be formatted a little bit nicer? Yes, I have done a small test with one of my libraries and created a Fiddler2 plugin. See the results below:

I hope to get the Plugin working correct until end of this week, nearly all types of JavaScript coding are working already. On Friday I will publish a first beta version.

8 Comments

Comments have been disabled for this content.