Debugging JavaScript in IE7

I need to debug JavaScript in Internet Explorer 7.

Unfortunately, its default debugger doesn't provide me with much information. It tells me the page that the error showed up on (not the specific script) and gives me a line number. I don't know if that is related to my problem.

It'd be nice if it could narrow down the error to a line number on a specific script (like Firebug can).

Is there an addon to debug JavaScript in IE7 like Firebug does in Firefox?

Thank you!

See also:

Does IE7 have a “developer mode” or plugin like Firefox/Chrome/Safari?


Solution 1:

Web Development Helper is very good.

The IE Dev Toolbar is often helpful, but unfortunately doesn't do script debugging

Solution 2:

The hard truth is: the only good debugger for IE is Visual Studio.

If you don't have money for the real deal, download free Visual Web Developer 2008 Express EditionVisual Web Developer 2010 Express Edition. While the former allows you to attach debugger to already running IE, the latter doesn't (at least previous versions I used didn't allow that). If this is still the case, the trick is to create a simple project with one empty web page, "run" it (it starts the browser), now navigate to whatever page you want to debug, and start debugging.

Microsoft gives away full Visual Studio on different events, usually with license restrictions, but they allow tinkering at home. Check their schedule and the list of freebies.

Another hint: try to debug your web application with other browsers first. I had a great success with Opera. Somehow Opera's emulation of IE and its bugs was pretty close, but the debugger is much better.

Solution 3:

you might want to try microsoft script debugger it's pretty old but it's quite useful in the sense if you stumble on any javascript error, the debugger will popup to show you which line is messing up. it could get irrating sometimes when you do normal surfing, but you can turn if off.

here's a good startup on how to use this tool too. HOW-TO: Debug JavaScript in Internet Explorer

Solution 4:

I've found DebugBar.

Not as good as Firebug, but close.