Visual Studio 2012 comes with the very nice Page Inspector. I like it! Problem though, I haven\'t found how (if?) I can turn on JavaScript debugging. Could someone point me
In IE9 (only one time): Tools > Internet Options > Advanced tab > In Browsing category > Clear "Disable script debugging" check boxes (both) > restart IE.
In VS 2012: Run the Page Inspector ( when javascript error box opens, click No ! )
Choose from VS menu: DEBUG > Attach to process...
Select "WebBrowserServer.exe" and click Attach
In Page Inspector window click the Refresh icon.
Debugging works pretty well, but it's one condition. Don't insert any breakpoints in your code (or clear them before - DEBUG > Delete All Breakpoints). There can cause a lot of problems - from hanging and frozing to entirely crashing your VS.
Until this week, I was able to carry debugging of JavaScript in Visual Studio 2012 merely by entering "debugger" in the JavaScript function which acted as a breakpoint, and was able to step through the JavaScript code in the Visual Studio window just the same as the C# code. I did this for the past 11 months until 1 week ago. I made no changes to the default installed settings.
This was the solution suggested in the Asp.Net Forums by Rion Williams. http://forums.asp.net/t/1984115.aspx?Debugging+Javascript+in+MVC And as stated it has allowed me to properly step through my code for the last 11 months.