There are a couple of conditions that need to be met before this all can work. First off you need Visual Studio Web Developer Express, which is version 2008 of this writing. To download Web Developer Express, visit the following site:
Web Developer Express (hereon referred to as WDE) will open whatever browser is set as default to debug sites. That said, you will need IE to be the default browser for your development session.
You'll need to ensure that script debugging is enabled in IE, by going to Tools->Internet Options, Advanced tab, and de-selecting the Disable Debugging checkboxes:
var list_items = document.getElementsByTagName('li');
for ( var i = 0; i <= list_items.length; i++)
var current_item = list_items[i];
alert(current_item.nodeName + ' ' + current_item.innerHTML);
window.onload = displayItems;
The issue in the code is an off by one error with the counter variable, which will cause certain values to be null. Now then, time to get started.
Then select an Empty Site, and tell it to exist on the local file system, as this won't need any uploading to ftp or posting to HTTP servers with frontpage extensions:
This leaves us with a brand new empty site. Now comes the trick part.
We're going to start a debugging session. From the debug menu we want Start Debugging:
The first time that debugging is done, WDE looks for a file, Web.config to check for debugging settings in there. As our site is blank, it will offer to create a Web.config file with debug settings:
Go ahead and confirm. Now a new browser window will popup. If the browser is not IE, you'll need to stop debugging from the debug menu and set IE as the default browser. If you don't, IE scripting won't be debugged. Right now your browser will be pointing to the local ASP Development server. All that needs to be done here is point to our page we want debugged, http://www.site.com/js_test.html for example.
When IE throws an error, WDE will pick it up and bring focus, giving you an error:
Pressing Break will give you access to the main screen:
There you have it, the line in question is highlighted, so you know exactly where IE is choking at.