Check out the jsshell extension for Chrome, the same pattern here is used for a great dev tool.  I wish this was available for IE9 as well:

http://somewebguy.wordpress.com/2010/01/12/jsshell-2-0-the-release/