Ah, the joys of script debugging in Internet Exploder. I've been trying to track down a bug in the Layout Manager in the latest beta of Theme Builder and it's been a nightmare...
Enable Script Debugging
By default, Internet Explorer 7 doesn't do any debugging. Gee, that's useful.
So, before we can do anything else (other than look at useless "invalid property" dialog boxes), we need to enable debugging.
To do this, go in to the advanced options and look for the following options and... deselect them (intuitive as ever, thanks M$)!
Right, now we can debug... NOT! You'd expect that having enabled debugging, a debugger would suddenly appear when there was an error. Oh no, not in IE.
Microsoft Script Debugger
Having done a quick google, I found the free Microsoft Script Debugger and installed it and up it popped next time I hit a JS error. I was aware that Alain Moran had already tried this and got nowhere with it, but thought I'd give it a go just in case a second pair of eyes spotted something different.
Don't even go there. I'm not even going to waste blog space on this piece of <insert expletive here>. It really is truly pants.
Microsoft Script Editor (MSE)
After more googling and suggestions from the GeekUp list, I found that there was a better "free" (as in "bundled with a product I already own") offering from Microsoft - Microsoft Script Editor. This is possibly one of the better kept secrets of script debugging in IE.
From what I can tell, you need to have Office 2003 or later, or possibly MS FrontPage installed. Luckily, I have MS Office 2003.
However, the script debugger isn't installed by default so I went in to MS Word and under the Macros menu found a link to launch the script debugger which then prompted me to install from the Office CD (and I did just that).
click thumbnail to enlarge
For a tutorial on using MSE, read the "How To".
It initially looked like this basic debugger would be just enough to help me track down some bugs, but it quickly became apparent that it really struggles with dynamically generated pages, AJAX and complex JS.
Before long I was being told that there were JavaScript errors inside style sheets, meta tags and even paragraphs on the page where there was clearly no JS involved. Rargh!
Microsoft Visual Studio
I was also told to take a look at MS Visual Studio. It's possible that Visual Studio is a great product, but I'm not going to install an expensive piece of bloatware just to do some simple JS debugging. Sorry.
So, it seems I'm out of options?
Aptana Studio Professional - to the rescue!
Just when I was about to give up hope, Stuart Grimshaw posted on the GeekUp list saying that he'd heard about something called Aptana Studio Professional that might be able to debug JS in IE. Michael James quickly grabbed a trial version and confirmed that it did!
click thumbnail to enlarge
Oh my, what a life saver. Based on Eclipse, Aptana runs on Windows, Mac OS X, Linux and pretty much anything else that supports Java. It works with both Internet Exploder and Firefox allowing consistent debugging between across multiple platforms and browsers.
The script debugging, which is awesome, is actually only one of the components within Aptana - it has tools for working with JSON, XML, AJAX and a whole lot more.
So far, it's successfully been able to track down every bug and provide extremely detailed drill-down information that makes bug fixing almost trivial.
At long last MSIE has something other than Visual Studio capable of doing proper JS debugging! It's well worth the $99 they charge for it just for the debugging features alone.
I'd write more about it, but I'm too busy playing with it. Expect Theme Builder beta 19 out early next week with full compatibility for Internet Explorer 7 in the Layout Manager 
I did manage to get the MS script debugger running eventually .. I think restarting the machine helped .. gotta love windows :s
Apparently there are some other tools for debugging in IE:
Here's another one: Microsoft Visual Web Developer (thanks for the heads up Enrique)
Hi,
For JS debugging, you can also try Companion.JS ( http://www.my-debugbar.com/wiki/CompanionJS/HomePage ) which gives detailled info on JS errors under IE, as well as "console.log" feature compatible with firebug under IE.
Hope this helps.
JFR
http://www.debugbar.com