Visual Studio 2010脚本调试器对我来说不起作用 [英] Visual Studio 2010 script debugger doesn't work for me

查看:204
本文介绍了Visual Studio 2010脚本调试器对我来说不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了VS 2010 Beta 2,想玩一个ASP.NET MVC 2项目。我只是在Home控制器的index.aspx视图中添加了一些脚本( alert('hello'); ),我可以看到它执行。然而,当我尝试设置断点时,它不会被击中。我也尝试使用调试器关键字,当我这样做时,我得到一个令人失望的当前位置没有可用的源代码消息。当我尝试独立附加到我的应用程序运行的IE进程时,我也收到此消息。

I just installed VS 2010 Beta 2 and wanted to play with an ASP.NET MVC 2 project. I simply added some script (alert('hello');) into the Home controller's index.aspx view, and I can see it executing. When I try to set a breakpoint, however, it never gets hit. I also tried to use the "debugger" keyword, and when I do, I get a disappointing "there is no source code available for the current location" message. I also get this message when I try to independently attach to an IE process where my app is running.

我需要做什么才能获得友好的脚本调试体验? (我已经成功地使用Firebug来调试这个,但是由于某些原因,我更喜欢VS调试器。)

What do I need to do to get a friendly script debugging experience? (I have successfully used Firebug to debug this, but for some reason I prefer the VS debugger.)

这里有一些我的配置细节:

Here are some details of my configuration:


  • 我在VS 2010 Beta 2中启动了我的内容。

  • IE8版本8.0.7600.16385是我的默认浏览器。 li>
  • 取消选中禁用脚本调试(Internet Explorer)高级选项。

  • 取消选中禁用脚本调试(其他)选项。 li>
  • 在我的ASP.NET MVC 2项目的web属性选项卡中,选中了ASP.NET调试器。

  • Visual Studio 2008脚本调试似乎工作正常。

  • I am launching my stuff in VS 2010 Beta 2.
  • IE8 version 8.0.7600.16385 is my default browser.
  • The "Disable script debugging (Internet Explorer)" advanced option is unchecked.
  • The "Disable script debugging (Other)" option is unchecked.
  • In my ASP.NET MVC 2 project's "web" properties tab, the ASP.NET debugger is checked. All others are unchecked.
  • Visual Studio 2008 script debugging seems to work just fine.

推荐答案

调试器不能同时调试Silverlight代码和脚本代码,如果选择了Silverlight调试器,则JavaScript调试已关闭。

The debugger cannot debug both Silverlight code and Script code at the same time, if the Silverlight debugger is selected JavaScript debugging is switched off.


  1. 转到项目的属性(Alt + Enter)。

  2. 对于网站项目:选择开始选项。或用于Web应用程序:转到Web选项卡,底部您将看到调试器选项。

  3. 检查如果您想要调试JavaScript,则不勾选Silverlight复选框。 (不幸的是,这里的UI不清楚这个副作用。)

这篇关于Visual Studio 2010脚本调试器对我来说不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆