IE8 Developer Tools Javascript Minimized

2019-08-11 03:06发布

问题:

When I open the IE8 Developer Tools (using F12), click on Scripts, and choose the project's .js file, the Javascript that is displayed is minified. This makes debugging almost impossible. In researching, I found a reference to a "configuration button" that appears would pretty-print the Javascript source. Unfortunately I cannot find that button in the IE8 Developer Tool tool-strip or menu. XP SP3 TIA Gus

回答1:

unfortunately that is only available in IE9's developer tools, in the configuration menu:

MSDN article on Dev Tools in IE9

Edit:

One last option could be using FirebugLite, if infact IE8 is minifying the javascript for you, Firebug should not, you can get FirebugLite in IE by using it in a bookmarklet: http://getfirebug.com/firebuglite

basically what you have to do is create a bookmark in IE (of say the firebuglite website) then right click -> properties, and change the URL to be:

javascript:(function(F,i,r,e,b,u,g,L,I,T,E){if(F.getElementById(b))return;E=F[i+'NS']&&F.documentElement.namespaceURI;E=E?F[i+'NS'](E,'script'):F[i]('script');E[r]('id',b);E[r]('src',I+g+T);E[r](b,u);(F[e]('head')[0]||F[e]('body')[0]).appendChild(E);E=new%20Image;E[r]('src',I+L);})(document,'createElement','setAttribute','getElementsByTagName','FirebugLite','4','firebug-lite.js','releases/lite/latest/skin/xp/sprite.png','https://getfirebug.com/','#startOpened');

when you click the bookmark, firebug should popup in the bottom of the page


EDIT: Firebug (including Lite) has a BSD license. Since the source code is reproduced in this answer, the following license should be included:

Software License Agreement (BSD License)

Copyright (c) 2009, Mozilla Foundation All rights reserved.

Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  • Neither the name of Mozilla Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission of Mozilla Foundation.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.