调试JavaScript与IE9,Visual Studio 2010中,MVC3和剃刀语法 [英] Debugging Javascript with IE9, Visual Studio 2010, MVC3 and Razor syntax

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

问题描述

我试图让JavaScript调试与IE9和VS2010的工作。

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

我已经启用调试在IE9。

I've enabled debugging in IE9.

我确信,Silverlight的调试在项目设置中禁用。

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

和放置一个断点在我(剃刀语法MVC3)code。

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

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

And nothing happens when I run it :/

这已经发生了,现在几个月和过许多项目,所以它不只是断点从未达到或基于一些愚蠢和code。

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.

我试过:

卸载和resinstalling IE9。

Uninstalling and resinstalling IE9.

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

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

制作需要code裸露的最小量。

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.

手动设置与断点调试器。这将导致挑你的调试器窗口出现,并在名单上有新的或现有VS实例除了的运行现场即一个会做的工作之一。

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是我的默认浏览器。

IE is my default browser.

推荐答案

当您运行点网与IE浏览器作为默认浏览器搜索应用
你可以看到Solution Explorer中,最后加起来的东西如图所示的黑盒子结果
已经被加载在资源管理器如文件名localhost的结果在这里
刚上双击文件,你会看到HTML code以及JavaScript的有结果
现在,在这里你可以把断点,这将肯定搜索结果工作

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

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

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