Using Opera to troubleshoot Javascript errors in IE

posted by CodeGirl
Bookmark This Page:   Add 'Using Opera to troubleshoot Javascript errors in IE' to Del.icio.us Add 'Using Opera to troubleshoot Javascript errors in IE' to digg Add 'Using Opera to troubleshoot Javascript errors in IE' to Simpy Add 'Using Opera to troubleshoot Javascript errors in IE' to OnlyWire 

I have a web app that uses a bunch of to do Ajaxy things as well as simple hide/show of DIVs. None of it seems to work in Internet Explorer. Since I am forced to support this horrific “browser”, I figured I better check every page within IE. IE error messsages regarding javascript suck. Like IE, they are completely utterly USELESS. Most of my error messages are a simple ‘object expected’. Wow, thanks for nothing.

I decided to give the same web app a try in Opera just to see how it behaved. Unfortunately it breaks in almost all the same parts. Bonus: the Opera Javascript console is infinitely more helpful and specific with its error messages.
Example:

Event thread: click
Error:
name: ReferenceError
message: Statement on line 1: Reference to undefined variable: showFilterOptions
Backtrace:
  Line 1 of  script
    showFilterOptions();
return false;
  At unknown location

Why the %^&* can’t IE give out that kind of info? The “script debugger” I got from MSDN was also of little use troubleshooting, and sucked up a lot of ram/cpu cycles.

Bottom line: use Opera’s javascript console to debug any javascript issues that Internet Exploder is having.

This entry was posted on Wednesday, July 5th, 2006 at 3:03 pm and is filed under javascript. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

10 Responses to “Using Opera to troubleshoot Javascript errors in IE”

  1. Stephen Clay Says:

    Opera’s error panel usually does the job, but occasionally MS’s script debugger is useful for one feature: View > Call Stack, which lets you backtrack through nested function calls. And of course sometimes IE just has problems with perfectly fine code. Consoles in better browsers can’t catch errors that don’t exist :)

  2. Arc Says:

    This technique may work for me, if only Opera 9 didn’t segfault on both Windows and Linux shortly after loading my website.

  3. Seth Says:

    MS’s script debugger is useful, but I’ve found if you have access to Visual Interdev (shudder) it gives a lot more detailed messages.

  4. netdragon Says:

    Opera doesn’t use IE’s Javascript engine, so although I think Opera tries to mimick the way IE works to some degree on some things, it will only give false positives as to what the problem is in other cases. I’d instead focus on trying to make it also work in Opera, and hope that solves the problems in IE. If not, I’d use MS’s script debugger (or Visual Studio). I know it stinks, but ’tis life. Someday, hopefully, Microsoft will get their acts together.

  5. Steve Love Says:

    Thank you! You just saved me a whole heap of trouble trying to figure out what Internet Explorer meant exactly when it told me an object was expected.

  6. HL Says:

    As much of a pain it is to get the DOM working with IE, I really can’t hate its debugger; it not only allows you to break and step through javascript, but also allows you to read its call stack and the contents of all objects within the scope of the breaking function.

  7. Chrsi Dawes Says:

    debug bar (debugbar.com) is great for IE and free for personal use! :-)

  8. Yanal-Yves Says:

    In order to debug javascript under Internet Explorer, install Visual Studio 2008, create a new web site, put your hmtl/javascript app inside. On IE menu “Tools”=>”Advance Option” under the “advance” tab clear both “disable script debugging” checkboxes and check “display a notification about every script error”. In VS2008 run the website in debug. You will be able to debug everything on a web page (breakpoints, watch, wiew all scripts loaded by a page, …etc! Debuggin IE will never be the same!

  9. 110110010 Says:

    Hey! You didn’t help me a lot.. I’ve got an error in big script, but only IE says there’s an error. Opera and Mozzila Firefox run the script without any bugs… So what should I do, if I haven’t got any money to buy Visual Studio? …

  10. vlad Says:

    Hi!
    I just wanted to say that I’ve tried DebugBar and IEWatch - the new nifty tools made my M$ to bridge the infinite gap between them and web developers, and they both suck. I cannot use them for simple error reporting in JS.

    I can use Opera though, and I thank you for this blog post!

    Seeing it was written 2 years ago, I shiver. M$ still sucks, and I do not doubt that IE8 will too.

    PS. The VS2008 solution is hilarious… I mean.. AS IF! :PP - though I don’t doubt it’s effectiveness. Oh, if someone tries this, please use a pirated copy :)

Leave a Reply

Comment moderation is in use. Please do not submit your comment twice -- it will appear shortly.


Protect Web Form!

Bad Behavior has blocked 88 access attempts in the last 7 days.