Using Opera to troubleshoot Javascript errors in IE
posted by CodeGirlI 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.
EDIT: I use Linux for my desktop and development. I can run IE thanks to WINE. However I wouldn’t even consider attempting to run additional Windoze software. Therefore Opera’s debugger is the best choice _for me, as a Linux user_. But YMMV
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.





July 15th, 2006 at 4:53 pm
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 :)
July 26th, 2006 at 5:50 pm
This technique may work for me, if only Opera 9 didn’t segfault on both Windows and Linux shortly after loading my website.
January 11th, 2007 at 2:58 am
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.
March 6th, 2007 at 12:56 pm
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.
March 31st, 2007 at 3:05 am
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.
November 6th, 2007 at 3:43 pm
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.
January 11th, 2008 at 12:07 am
debug bar (debugbar.com) is great for IE and free for personal use! :-)
January 12th, 2008 at 8:51 am
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!
March 11th, 2008 at 3:59 am
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? …
April 24th, 2008 at 9:39 am
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 :)
January 17th, 2009 at 5:28 pm
Use Visual Studio Express Edition : it’s free !
http://www.microsoft.com/express/download/
January 25th, 2009 at 7:59 pm
Hello,
No money is needed : Visual Studio Express Edition is free (this is not a trial but a free version of Visual studio)
- http://www.microsoft.com/express/vwd/
As an alternative way you may also use Microsoft script debugger : http://www.microsoft.com/downloads/details.aspx?familyid=2F465BE0-94FD-4569-B3C4-DFFDF19CCD99&displaylang=en
January 28th, 2009 at 5:00 pm
Well, I’m using JS debugger for IE, the one from MS Office. It’s not as cool as, for example, firebug in firefox (firebug is the best web-developing tool I ever seen), but it’s pretty useful for JS debugging. Breakpoints, variables, tracing, it really can do it. As for extending of error description, maybe Opera console is better, I’m not sure. Without normal debugging tool it’s very poor, and advices “add [postError] after every JS line” is very, very annoying (maybe even idiotic). Nowdays Opera is proudly introduces Dragonfly, on fact - firebug clone. But it’s still alpha or so, it’s somewhat loading from Opera site (sic), and many of it’s features works strangely.
Summary: use firebug for developing/debugging wherever you can.
For specific browser errors there must be debugging tools in the every browser. For IE it can be installed from MS Office (used on 99% windows comps, Vis studio hmmm.. 5% ?). For Opera wait for stable Dragonfly or buy debugging app (he-he-he) or shamanic dances.