Debugging JavaScript is always a problem, but even more so in IE. Things should be better in IE8 but today my focus was on IE6. The tip of the day is: when IE shows an error during loading, it will provide you with a line number. You can look for hours at the line number and not figure out what it means and where the error happened.
I found out after much puzzling that IE will show the line number where the error happened from the file. So if you load foo.js and an exception occurs on line 731, IE will tell you only the line number. You have to find out for yourself which file is the cause. Oh, and you should subtract 1 from the line number.
Why is it impossible for IE engineers to provide helpful error messages? Is it so hard to actually show the filename as well?
Martijn,
What’s worse is that sometimes the line number is totally impossible to trace because it’s not from an included file, but rather refers to the line number in the constructed HTML file that is rendered, complete with included JS, as with a finished Wicket page. It’s incredibly frustrating.
But do not abandon hope. The answer to your problems is the Microsoft Script Debugger. If you have JS debugging turned on and can induce the error, the SD will pop up with the file that caused the problem and the line that caused the problem is highlighted; exactly what you need to debug the problem.
Instructions for debugging and installing can be found on the MS IE blog. As with most IE developer solutions (like the invaluable IE developer toolbar), it’s not the most stable piece of software in the world, and you may find yourself having to restart IE multiple times on occasion in order to get the script debugger to show up properly when there’s an error.
The other thing that’s stupid about it is that when script debugging is turned on, the little exclamation icon in the status bar does not show up anymore. Dumb, dumb dumb. It’s imperfect, but better than the utterly useless error message in the standard IE installation.
Hope this helps.
Oh, and one more thing: the MSDN documentation links in that blog post (almost 4 years old now) are broken: you’ll want to go here instead.
FYI – I’ve found MS Script Editor to be a big help when debugging JS issues on IE.
For this purpose, I use CompanionJS, which helps me a lot, here is the link: http://www.my-debugbar.com/wiki/CompanionJS/HomePage
So true… I read one day that guys who debug javascript will have a special place in Paradise…
Sometimes you just need to spend hours debugging IE js, but sometimes it helps to debug the error with the firebug extension for firefox… if the error also pops out in ff, that is.
Man do I hate I.E. with a passion. So many things I could complain about.
Firefox is the truth
As user, I’ve considered IE as a useless crappy browser. Easy to ignore it.
Now, that I’m trying to create my own websites, I need to consider it and I really HATE it!!!
Opera and firefox always work well but when I try with “the shitty”, there’s always something wrong.
Last issue due to an incompatibility (no solutions for this, only bad workarounds) with the thumbnail retrieved in PHP by using exif_thumbnail…
I’m thinking to let the site “bad” for IE users with a warning: “if You are using a crappy browser, this page is enough good for you”
I need to write this somewhere and i’ve found this page searching “I hate IE”!!!
Thanks for having created it.
Luca
IE 6 (ie7 i can tolerate) has wasted so many hours of my life I have lost count and believe you me its still wasting more, its a horrible, nasty, ugly, lazy, piece of software that no belongs in the start menus of our computers and has definately over stayed its welcome on the internet!
Luca: As for the warning: I support this!
) It would be great if more non-commercial sites did this, I mean just stopped tuning/fixing for MSIE:
“No addEventListener? No application/xhtml+xml? No documentevaluate? Well I’m so sorry, ROFL!”
I HATE IE! HATE IT; It?s JUST PURE AND SIMPLE HATE, Why?, I could spend hours behind a site’s design and all works like a charm TILL I HAVE TO USE THIS CRAP OF BROWSER. NO NO NO. Always the same story, same, same, same history. NOTHING works property with IE, NOTHING, always there?s an issue to fix, a patch to apply, a something special code to add. MY GOD! GO FOR FIREFOX; THAT?S ALL YOU NEED. A ton of web designers will appreciate it.
!ERASE IE FROM THE FACE OF EARTH!. PLEEEEEEEEEEEEEEEASSSSSSSSSSSSE.
At least they realise they are so crap and created http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx so we can make workaround’s with SOME kind of ease… xD
But yeah. Hate, hate hate.
Just get Firefox….it will save everyone a lot of headaches. IE is just another microsoft ploy that has ultimately failed. PLEASE, I beg you, go away from his ploys to exploit you. Link this name: Hachamovitch to the one in Illinois, Blagojevich, sounds familiar…..and like djburner above says…..it’s so easy to erase IE and restart your compiter anew………ERASE IE FROM THE FACE OF EARTH!. PLEEEEEEEEEEEEEEEASSSSSSSSSSSSE.
Jeff.
Okay, so even though no one has posted for a while. YES, IE IS EVIL. There, I said it. I feel much better. Why can I put up my site, work on it for months, have it look “perfect” on IE, then do minor, and I do mean minor, adjustments, then POOF IE retardation sets in. Someone who knows me sees the site, freaks, and lets me know. Great, I look like stupid. I am sick of IE. Ah, I feel much better. So, should I boycott IE, as in deliberately have my site look goofy in IE, putting a message to dump your browser for firefox, or should I “fix” meaning hack my site continually to conform to IE’s continual retardedness?
Your call..
JUST GRIND IE IRREVERSIBLY INTO POWDER UNDER THE NAILED HEELS OF YOUR SHOES
nahhh, don’t bother with the whole thing, keep it looking spiffy in other browsers, and touch it up in IE JUST enough to look satisfactorily sane, whether or not the niceties available to other browsers show up in IE.
Internet Explorer is just a piece of crap. I have been using Firefox for 2 years now, and I LOVE IT-it’s fast, doesn’t drive me crazy with pop-up windows asking me “Are you SURE you want to go there? Do this? Close that?”, it remembers and re-opens my closed pages, it’s intuitive, simple, efficient, and works with my windows XP Prof. just fine. Hell, it worked just fine with my Windows 98!
Internet Explorer is painfully slow, does not start when I want it to, it’s new interface (IE&) sucks as it’s hard to know what does what on its crappy interface. I only use it when a website calls for it, and I hate the websites that call for it, as well. They need to get with the program, and stop gearing their sites on this bloated crappy Internet Explorer.
According to CrunchBase:
“Dean Hachamovitch is responsible for the design, development, and release of Internet Explorer. His passion is delivering trustworthy software that customers love.”
ROLFMAO !!! …
Never in the History of Computing there has been such an statement so far off from reality.
I googled ‘ie hate page’ and your page came up. First, thank you for creating that kind of page, I’m sure many people need it.
Now, excuse me for a few lines…
IE is nothing more than CRAP!! IE6 is old crap, IE7 is newer crap, and IE8 is the newest crap! For Firefox/Opera/Chrome/etc it takes me few minutes and one cigarette to solve a (let’s say alignment) problem, but for IE it takes me a day and 2 packs of cigarettes! IE is literally killing me!! Live longer, feel better, make web less complicated by NOT using the IE!
I appreciate your kindness for letting me spill out my anger. If you ever come to Slovenia: email me, I’ll buy you a beer!
Thanks again.
I hate internet explorer with passion, i have spent the best part of two weeks designing a website, only for internet explorer to spit out the message ‘operation aborted’ as soon as i put it online,
works perfectly in Safari, FF, chrome, but cufon text doesnt render properly, and the message webticker refuses to move an inch
Usually, you wouldnt care, but considering the large majority of users dont know there is any browsing software apart from IE, you are forced to make sure your pages are compatible
Internet explorer developer team, Please just stop doing anything, your software is completely incompatible, annoying and just plain annoying
I’ve migrated to Firefox on all my machines … except this one. MS sucks ass on all of my performance measures.
I HATE IT! I HATE IT! I HATE IT!
Looking at google analytics today and found out that 25% of people are still using ie 6 WTF!!! Then looked at the page from some old box with ie 6 and guess what page is totaly screwed up! No no i’m not repairing this shit anymore, from now on i’m writing standard compliant code and not even looking in any ie browser!
IE is FUBAR!
IE8 won’t resolve my FontBurner sIFR.
It mis-aligns my navigation menu.
The font sizes change. I thought 16px was 1em…
Can we force IE to run in Firefox mode on our site visitor’s computers?
Is there a hack to secretly run the Firefox engine inside of an IE tab immediately before the page loads?
Check out these stats at www[dot]w3schools[dot]com/browsers/browsers_stats.asp
August 2009:
IE7 15.1%, IE6 13.6%, IE8 10.6% (IE total 49.3%), Firefox 47.4%, Chrome+Safari+Opera 12.5%
IE’s not going away soon. Perhaps Google will release its own operating system, sell it to Dell and Gateway for pennies on the microsoft, and give Firefox to millions!
just noticed this post on IE6 and wanted to share with you a video we just made on the topic: http://fluidsurveys.com/blog/2009/09/28/top-10-reasons-why-we-love-ie6-internet-explorer-6/
OMG! I’m working on a site for a client and I thought well lets check it in IE8. Result: Loads of script conflicts (such as PNG Alpha transparency in combination with jQuery opacity statements) and heaps of display problems. I’ve tried to look for a png fix such as the ones for IE6 and came to the conclusion…. THERE IS NOT ONE!!!!!
AND NOW COMES IT!!!!.
I’ve checked all the sites that I made over the last 2 years in IE8 and I was shocked to see that they all have major issues regarding usability, display and functionality.
After cursing for an hour or so and wishing Bill Fucking Gates everything what we don’t want to have, I really don’t know how I’m going to explain my former clients that I need days and in some cases even, weeks, to solve all the issues and that they have to pay for me to do so while actually BILL FUCKING GATES have to pay me for that.
Seriously, I know that I as a web developer can’t ignore Internet Explorer, because there are still too many end users stuck with the shitiest browser on earth, but deep in my Firefox, Opera, Safari, Chrome, etc, HEARTH… I WISH I COULD!
its a fucking piece of shit and it pisses me of. MS are wankers.
I hate internet explorer and outlook express. Half the time when I try to log on; notice I said try, I’m told that internet explorer can not display the web page and I find out that there is no problem with my connection. With outlook express I get error messages when all I did was click on and haven’t even typed anything. What a pain in the ass! For me to type that, I am really fed up.
not going to type anymore
I hate Internet Explorer 7 but the real reason is that Microsoft Internet Explorer really sucks !!! When people log onto Internet Explorer they will get the problems ( trogens, viruses, error messages etc. ) people should go to other web browsers and make the switch like I did. I switched to Mozilla Firefox about late 2006 and I am really happy with my switch. Another thing I did was switch to OpenOfficeOrg.3 this software is the better allturnative to Microsoft Office it’s better looking and I also switched over to Goggle Chrome. Microsoft should make better software. Microsoft is the worlds biggest software company why is that they want you to buy more and more of their software when their software malfunctions Microsoft’s Web Browser is in my opinion is CRAP !!!!
Microsoft makes a bad crappy web browser. I made theswitch to Mozilla Firefox late 2006 and I am really happy I made the switch. I also switched over to OpenOfficeOrg.3 and I also am very happy I made the switch. Microsoft Office is not very good. I also have an addtional web browser called Google Chrome. In my opinion Microsoft web browser Internet Explorer is really CRAP !!!!
i hate it … it does’nt allow me to log in to my facebook account….. i hate it …… it’s slow…… moody? sometimes slow sometimes too slow….. is there anything faster than that? it always pop send report… but even i send it it always happens…. i hate it i hate it hate it…. i have to take sometime to open my account… whta about my friends… they,re not always when i log in… and my pet game on thw site what about it? is it still my fault even i tried…. i often think that IE have’nt adopt the new tech… or program? maybe i don’t much but i know i hate it.
I’m at work right now debugging my page. I have a tree control that loads super fast in firefox……in IE7 and IE8 it takes so long, sometimes over a minute. And then if I open this Developers Tool (F12) in IE8, the whole page freezes and I can’t do anything for 2-3 minutes except to terminate the process.
Ofcourse performance isn’t the only issue. CSS layout can be a nightmare in IE. At times layout works like a charm in FF and is total crap in IE.
I really I hope in the near future chrome or firefox would take the lead and become the dominant browser but I guess that’s just wishful thinking.
Why on earth is IE still such a piece of stinking shit? Why aren’t the IE developers making it work like other browsers? I’ve been working on web developing for quite a while now, and you know which is the part I hate the most? Making the site work properly in IE.
Damn Microsoft guys.. you’re gonna rot in hell for making IE… :X
I hate Explorer i wish that we delete it from this world!
Javascript is an interpreted language, and like most interpretative languages it gives a ton of freedom. Especially in its concepts of types. Meaning (coming from a structured programming background C,C++) etc it almost lets you get away with murder.. A variable as var i=1 and then i=”hello there” is allowed (changing from integers to strings) etc.. Where IE fails miserable is it tries to force structured programing strictness in an almost free for all programming environment. The biggest problems Ive seen are this free for all type assignment. For example any mozilla based browser lets you freely give any value to any object that you want. As in object.style.height=adjkasdjsak; Whereas IE in a double standard says that an interpretative language has to perform like a structured language but only when its convenient for IE. For example setting the DOM style properties on any object as height to some bogus value causes IE to fail whereas mozilla ignores it. Using reserved words as “value” etc or any word that IE determines is a reserved property causes IE to punt. As var value=1 (fails in IE because value is a reserved word). Most conflicts in IE programming vs Mozilla seem to rest in IE´s desire to force C style rules in javascript.
Oh yeah. This ball needs to start rolling. I dream of the days Internet Explorer is history. Every day it amazes may how this piece of genuine crap can still exist! Microsoft has shown they don’t give a ###, their time is up already! We need to respond. They will never come up with a decent browser. They have told us and that they are not capable. When do we start to listen?
I cannot believe this, I was so frustrated about a CSS nighmare created in IE8 that I just serched for I HATE IE, and then I realized that I wrote a hate message almost 3 years AGO!!!!!
Cannot believe the lifetime that IE has SUCKED out of me in this 3 year. When I read my OWN message from 3 years ago and see that the most people is stuck at this SHITTY browser made my anger becomes into something more like a really sad blue. Im not anger anymore, I just want to sitdown a begin to cry.
I have no problem to openly express in my webs a message like, For a better navigation use FF or Chrome. Plain a simple.
Okay guys, just one thing. Stop using hacks for IE. When it’s ugly in IE (but still working when it is not too much trouble), leave it that way so users of your sites can see the difference between browsers. Place a note on your website that it will looking better in other browsers like firefox, chrome or safari so they cannot blame you. Let your users know there are alternatives (not only the blue e that is associated with internet). Users must see the difference, don’t use hacks to get the same look, that’s stupid and that’s the fault. They don’t see your pain to get it compatible with this horrible piece of shit. Don’t use images when you can do it with CSS, that’s the difference between browsers.
Developers can break IE if they want but every developer on the planet must do this. When we do it all together and the user of the website can see the difference, there is an reason to switch. When user cannot see the difference there is no reason for them to switch!
Stop IE hacks and inform your clients about alternatives, it’s free and not bad,almost it’s better. When every developer do this it can change the world of browsing. Site visitors must not blame you about the looks, the must blame Microsoft but they have to be informed that there are alternatives to use and that is really better and matters.
Stop IE Hacks now!
I hate IE and I can’t stand Microsoft either. I think that they should pass a law in North America where we don’t have to have IE as a browser on our computers when we buy a new one with Windows OS. I’ve created websites and they look really crappy in IE, but, just fine in FF, Google Chrome, Safari and a lot of other browsers. Heard the developers at Google are coming up with an OS. Good for them. It’s about time those arrogant people at Microsoft are shown that their operating system is a joke. Look at Vista for example. Bill Gates is a joke too. I predict the end of Microsoft. People will start to say Microsoft? Who’s that?