Thursday, May 22, 2008

Debugging javascript errors in IE7 on WinXP

As you may have noticed, the built-in Script Debugger in WinXP cannot be used to debug javascipt errors in Internet Explorer 7.  It used to work in IE6, but doesn't work with IE7 because it can no longer bind to the browser process.

But fear not, it is possible!  You have to download Microsoft's Visual Web Developer 2008 Express Edition which is freely available.  Then you create a new project and select Debug-> Start Debugger.  This will open a new IE7 window with the debugger attached.  You can now access the site or pages that you want to debug, and because the debugger is attached, when the (ridiculously unhelpful) Error dialog pops up you can select 'Yes' to debug and you will be taken to the VWD debugger.

Check out this blog for a step-by-step guide.

No comments: