Enable the javascript debugger in the Page Inspector

折月煮酒 提交于 2019-11-27 17:50:53
  1. In IE9 (only one time): Tools > Internet Options > Advanced tab > In Browsing category > Clear "Disable script debugging" check boxes (both) > restart IE.

  2. In VS 2012: Run the Page Inspector ( when javascript error box opens, click No ! )

  3. Choose from VS menu: DEBUG > Attach to process...

  4. Select "WebBrowserServer.exe" and click Attach

  5. 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.

I think this link should get you started debugging in Visual studio 2012

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!