BizzyBee’s BizzyThoughts

Think Outside The Hive - About Notes and Web
 
 

A simple JavaScript debug console for Internet Explorer


When Firefox is your webmachine and you need to debug your JavaScript code, the answer is simple: use Firebug. 6 950 000 google search results can’t be wrong (ehm, t.i., if all hits are about the tool and we forget a firebug is also a beastie, but you get the point).

When it comes to debugging in IE (if IE is your target browser, you have to be able to test in it), choices are more limited. There used to be one from Microsoft, and there are some 3rd party tools for it too.

Don’t be shy and throw in your own preferred tool in the comments section of this article, I’m sure some of you have some excellent solutions for debugging Javascript in IE.

But sometimes simple is good enough. This script is for those who want a better alternative for clicking away repetitive alerts (a lot of us still debug in this way, like it or not).

I got it from a collegue who got it somewhere from the web, but I tweaked the UI a bit.

How to use?

  1. Download the IE debug script by rightclicking and saving it.
  2. Add a link to iedebug.js in the header of your webpages.
  3. Write to the debug console window by adding this line to your code: debug('some value');

This is a little demonstration:

Oh, and it works in Firefox too. Just in case you believe 6 950 000 results can be wrong.


1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

5 Responses to “A simple JavaScript debug console for Internet Explorer”

  1. Gravatar JFR says:

    Hi,

    There is also a JS console and error detail add-on here :

    http://www.my-debugbar.com/wiki/CompanionJS/HomePage

    Has console.log firebug feature, and reports detailled js errors, as well as source code, and a command line js.

    Hope this helps.

    JFR
    http://www.debugbar.com

  2. Gravatar Martin Vereecken says:

    Hey JFR (family of JFK?),

    Thanks for your feedback! I know the tool, bought a license a while ago. It’s good. I just wanted to give something to the needy that are happy with a tiny little very simple tool :-).
    But to the webcoder who want more, Debugbar has a lot of nice things to offer.

  3. Gravatar JFR says:

    Hi Martin,

    Good to see DebugBar is used by a lot of people over the world.

    Companion.JS is another add-ons, complementary to DebugBar to add more advanced javascript features to IE.

    The tool is free so far !

    Any comment, suggestion, etc are welcome !

    Thanks.

    JFR
    http://www.debugbar.com

  4. Gravatar Thomas Bahn says:

    Hi Martin, do you already know Firebug Lite?
    http://www.getfirebug.com/lite.html

  5. Gravatar Martin Vereecken says:

    Now I do! Thanks, Thomas, looks like what was missing in IE!

Leave a Reply