More JavaScript debugging goodness (with ASP.NET)

So in my haste to share this little gem here I forgot to mention some of the quirks that aren't obvious when you try to do this with JavaScript in an .aspx file.  I am a big fan of not explaining something someone else has already explained.  You can learn more about the quirks in the "Internet Explorer Known Debugging Issues and Workarounds" section here

My preferred approach to get JavaScript debugging working with .aspx files is to create a corresponding .js file for every .aspx file in my project and put my JavaScript "code beside" my .aspx page. For example, if I have a file called default.aspx the IDE generates a default.aspx.cs "code behind/beside" file for me.  This is where I put my server side ASP.NET code.  I will then create a default.aspx.js file for my client side "code beside" JavaScript.  I then reference default.asp.js in my in the default.aspx markup a script tag.

This gives me the same clean separation between markup and code that I have server side.  JavaScript breakpoints work as expected with this approach.  Set a breakpoint, and click the "start debugging" button on the toolbar or hit F5.  Hope this helps.