VS2010 and VS2012 “Script Documents” section never appears, and I can't debug JavaScript

梦想的初衷 提交于 2019-12-19 03:38:13

问题


Tools:

Windows 7, Visual Studio 2010 and 2012, IE 9, ASP.NET 4.0, MVC4

Until a couple of days ago I had been able to debug by using the Script Documents section in the Solution Explorer. Now, the Scripts Documents section does not appear when Start Debugging (F5).

I do have IE set as the default browser.

Using "debugger;" has no effect.

Configuration is set to "Active (Debug)."

Silverlight debugging is off.

I have 'repaired' the Visual Studio 2010 inatallation.

I have no idea how to correct this frustrating situation. What have I done to displease the VS gods?

Thanks for any advice!

Arnold


回答1:


This fixed worked for me to get the Script Documents node back:

  1. In the Website Project within the Solution Explorer, right-click any 'ol .aspx page and click "Browse With..."
  2. Select another browser (Chrome, Firefox) and click "Set As Default" and close the window
  3. Launch your website through the debugger. When it's finished, stop the debugger.
  4. Repeat steps 1 and 2, but select Internet Explorer in Step 2 as "Set As Default"
  5. Repeat step 3 and it should work. This will get your javascript debugging back.



回答2:


I originally got into the same situation when I down-graded from ie10 to ie9 to match the user community here.

Removing the meta tag made no difference for me. No surprise there.

Thanks to User1503081's suggestion, I finally resolved it by doing a Repair install of VS2012 Update 3 in my case. Would have given props to User1503081 directly but my "Reputation Points" don't add up. :-(




回答3:


I attempted the above answers (at least those which were relevant), but found the solution in re-running the VS2012 update 2.




回答4:


For anyone who might be facing the same issue I think I have it figured out. I have spent days and nights tearing my hair out on this, along with my usual duties. It's unfortunate that I couldn't get "real" work done because I was chasing tool strangeness.

I had the following line in_Layout.cshtml:

When I removed that line, Script Documents reappeared.

I'm going to mark this as 'resolved,' however, if anyone else can proffer a reason for the behavior of the software, I would like to understand.

Thanks,

Arnold



来源:https://stackoverflow.com/questions/12747525/vs2010-and-vs2012-script-documents-section-never-appears-and-i-cant-debug-ja

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