JavaScript断点的原因是什么? [英] What can be the reasons for JavaScript breakpoint is not hit?

查看:177
本文介绍了JavaScript断点的原因是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在剃须刀视图的脚本块中设置了一个断点。

VS2012附加到IE,但断点具有黄色三角形,带有感叹号:


目前不会打破断点。文档中的代码是
未加载。


IE的Internet选项启用脚本调试。



不知道有什么问题。

解决方案

我也面对这个问题。在Stackoverflow和其他网站的不同帖子中尝试了许多代码和事情之后,他们还没有解决我的问题。当我查看@ robert4解决方案并回到我的JavaScript代码,我看到一个错误,并修复它,通过这样做,我终于解决可能的问题,现在可以得到一个断点在我的JavaScript文档。对于那些将面临这种类型问题的人,我认为首先要做的是通过代码验证你的js文件代码,看看是否没有错误,然后开始实现每个其他解决方案从不同的帖子。 p>

I set a breakpoint in a script block of a razor view.
VS2012 attaches to IE but breakpoint has yellow triangle with exclamation mark saying:

The breakpoint will not currently be hit. The code in the document is not loaded.

Script debugging is enabled in Internet Options of IE.

Have no idea what is wrong.

解决方案

I faced this problem too. After trying many codes and things take from different posts in Stackoverflow and others websites, they have not solve my problem. When i have take a look for @robert4 solution and go back in my javascript code, i saw one error and fixed it, by doing like that, i have finally solve may problem and can now get a breakpoint in my javascript document. For those who will face this type of problem, i think that the first thing to do it is to verify your js file code by code to see if there is no error before beginning to implement each of others solutions take from differents posts.

这篇关于JavaScript断点的原因是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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