I recently was debugging the dreated “Operation Aborted” error, which was appearing in both IE6 and IE7. (Incidentally, Joel has written a great delineation of the three parts of software: design, development and debugging.) I usually do development in FF and then test in IE. But this bug is specific to IE, which made debugging harder. I was using IE6, looking at the error message and trying to find the line numbers it referenced. Pretty miserable. The fact that I was dealing with external code (Google Analytics, Google Website Optimizer) made it all the more fun!
I was testing at work, and feeling a bit frustrated. I found a reference to the Microsoft Script Debugger, but wasn’t able to find it separate from Microsoft Office.
I went home and tested on IE7, and saw the same error. I thought I’d try to find the debugger for IE7. It was easier than I thought–all you have to do is go to ‘Tools’, then ‘Internet Options…’, click the Advanced tab and uncheck ‘Disable Script Debugging (Internet Explorer)’. Then, when you visit a page with a javascript error, it asks you if you want to debug it. Fantastic!
As far as I know, that was a vanilla install of IE7. I’m thrilled they’re shipping a debugger, as it will make developing for them just a little bit easier.
Update: I was incorrect, I think that you need to install the script debugger separately. Link below.
[tags]ie7,javascript debugger[/tags]
Huh? are you sure this did what you were expecting? By default all this does is turns on the little yellow warning icon, and tells you that “object is not defined” with an irrelivant document/line #.
Unless you have Visual Studio, or the MS Script Debugger installed, in which case they will hook into the event and provide more info.
If so, you can do the exact same thing with IE6, but again, you have to have the other tools installed. IE7 does not ship with a JS debugger of any kind.
See the IE Blog for endless rants about that and other annoying things in IE.
http://blogs.msdn.com/ie/
Steve, you’re absolutely right. On the machine where I have IE7, I installed the script debugger a while ago. My bad.
It does appear that you can get the script debugger here: http://www.microsoft.com/downloads/details.aspx?FamilyID=2F465BE0-94FD-4569-B3C4-DFFDF19CCD99&displaylang=en
I’m going to try to install it tomorrow, when I’m in front of the computer that still has IE6.
Hi,
You can try Companion.JS which is an early version of a JS debugger under IE.
It already gives detailled info on errors as well as stack trace.
You can find it here.
http://my-debugbar.com/wiki/CompanionJS/HomePage
It is a good extension to DebugBar (http://www.debugbar.com)
Hope this helps.
JFR
I use SplineTech JavaScript Debugger. Very cool tool.
It’s a standalone javascript debugger though, NOT an IE add-on.
http://www.remotedebugger.com/javascript_debugger/javascript_debugger.asp
Cheers.
Tem
Hi Dan,
You may also find this site quite handy.
http://webbugtrack.blogspot.com/
Its a site dedicated to browser bugs, but as we all know, 90% of them are in Internet Explorer! 😉
It highlights some of the more frustrating bugs, and in many cases provides a solution to get around them.
frank
too bad these debuggers simply do not even spot my problem.
Before starting yet another fitful round of Javascript debugging on IE I thought I’d try searching in a different way which brought me to the site. Just a quick thanks for this note. I can at least see what’s going on now and why IE7 is complaining. Even though I use a good number of anonymous functions, like with JQuery, I am able to drill down which has been most helpful.
Thanks again,
Michael