Is there something like “Firebug for IE” (for debugging JavaScript)?

后端 未结 16 1126
北海茫月
北海茫月 2020-11-29 02:06

I\'m trying to fix some JavaScript bugs. Firebug makes debugging these issues a lot easier when working in Firefox, but what do you do when the code works fine on Firefox bu

相关标签:
16条回答
  • 2020-11-29 02:51

    In IE, go to MenuBar->Tools Select Debugger Tools Hit F12 and enjoy. It is far from Fire Bug, but suitable for some quick help

    0 讨论(0)
  • 2020-11-29 02:54

    You can try Firebug Lite or use Visual Studio to debug the JavaScript.

    0 讨论(0)
  • 2020-11-29 02:56

    The IE8 beta comes with what I think is the IE Developer toolbar, but it seems to be a lot more powerful than the last time I tried the toolbar on IE7

    0 讨论(0)
  • 2020-11-29 02:58

    I found a solution to this problem, you could simply stick this tag to the page you are trying to debug and it will open firebug:

    <script type="text/javascript" src="https://getfirebug.com/firebug-lite.js"></script>
    

    Explanation from https://getfirebug.com/firebuglite#Stable

    0 讨论(0)
  • 2020-11-29 03:04

    Since Internet Explorer 8, IE has been shipping with a built-in tool-set for debugging, troubleshooting, and generally helping in development of your pages/applications. You can access these tools by pressing F12 while in the browser.

    HTML Tab

    The HTML tab will let you peek into the DOM as the browser understands it. As you select elements from the HTML view, their styles will be detailed on the right, with individual rules have the ability to be toggled on and off. You can also modify rules, and determine whether the styles on the element were inherited, or assigned explicitly. Additionally, you can even tell which .css file they originate from.

    enter image description here

    There is a bit more you can do in the HTML tab, such as review and modify attributes on elements, and even make changes to the layout of the element from within the layout section. Additionally, you can make changes directly to the markup to quickly test out some structural ideas.

    Script Tab

    For resolving JavaScript issues, you can watch the Console and the Script Tag. If your script stumbles across an a call to an undefined method, you'll be alerted within your console. The console also lets you run arbitrary JavaScript against your page, if you want to toggle items on or off, or try bind a handler to a button.

    The Script tab great as well as it will format your JavaScript for you, allow you to insert breakpoints, step in and over code blocks, and watch variables over time.

    enter image description here

    If you've used Firebug, or even the Webkit Inspector, the F12 Developer Tools in Internet Explorer 8+ should be pretty familiar to you.

    0 讨论(0)
  • 2020-11-29 03:04

    Make a bookmark in the favourites bar, and put this address as the URL:

    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');
    

    Then navigatge to the page you want and click the link. Firebug Lite will/should open up...

    0 讨论(0)
提交回复
热议问题