使用IE9,Visual Studio 2010,MVC3和Razor语法调试Javascript [英] Debugging Javascript with IE9, Visual Studio 2010, MVC3 and Razor syntax

查看:146
本文介绍了使用IE9,Visual Studio 2010,MVC3和Razor语法调试Javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用IE9和VS2010进行javascript调试。



我启用了IE9中的调试。



我确定在项目设置中禁用了Silverlight调试。



在我的(Razor语法MVC3)代码中放置了一个断点。 p>



当我运行它时,没有任何反应:/



这已经发生了几个月以前的许多项目,所以不是只是断点是永远不会达到或愚蠢的和代码的。



我试过:



卸载并安装IE9。



确保我有最新的MVC工具,以便剃刀编辑器是最新的。





我可以找到所有的指南(这些都是我上面所做的变化)。



Doi在同事机器上使用相同的东西,它的工作原理。



使用debugger手动设置断点。这将导致选择您的调试器窗口出现,并且在该列表中,对于运行该站点的站点,即将执行此操作的站点,除了之外,还有新的或现有的VS实例

IE是我的默认浏览器。

解决方案

使用IE作为默认浏览器

您可以看到解决方案资源管理器最后添加一些东西,如黑匣子

所示,文件名称正在资源管理器中加载,例如localhost这里

只需双击该文件即可看到html代码以及JavaScript中的

现在可以在这里放置断点,这将有助于确保



I'm trying to get javascript debugging working with IE9 and VS2010.

I've enabled debugging in IE9.

I've made sure that Silverlight debugging is disabled in the project settings.

And placed a breakpoint in my (Razor syntax MVC3) code.

And nothing happens when I run it :/

This has been happening for a few months now and over many projects, so it's not just that the breakpoint is never reached or something silly and code based.

I've tried:

Uninstalling and resinstalling IE9.

Making sure I have the latest MVC tools so the Razor editor is up to date.

Making the bare minimal amount of code required.

Following all the 'guides' I could find (which are all just variations on what I did above).

Doing the same thing on colleagues machines, and it works.

Manually setting a breakpoint with 'debugger;'. This causes the 'pick your debugger' windows to appear, and in that list I have new or existing VS instances except for the one running the site i.e. the one that would do the job.

IE is my default browser.

解决方案

when you run the application in dot net with IE as a default browser
you can see the solution explorer add up something at last as shown in the black box
that have the file name being loaded in explorer eg "localhost" here
just double click on the file you will see the html code as well as the JavaScript there
now over here you can put the breakpoints and it will work for sure

这篇关于使用IE9,Visual Studio 2010,MVC3和Razor语法调试Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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