断点没有被击中在asp.net MVC JavaScript事件 [英] Breakpoints not being hit in asp.net MVC Javascript Event

查看:240
本文介绍了断点没有被击中在asp.net MVC JavaScript事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎是一个常规的问题,关于SO,我已经尝试了所有的解决方案建议,但没有好。

This seems to be a regular question on SO and I've tried all solutions suggested but no good.

我的问题是,在我的asp.net mvc的网站(VS2012)的断点都是被打在我所有的控制器code,但他们不是被在实际的javascript code打在aspx页面。在JavaScript中的断点,正显示出良好的老这个断点不会被击中。这些符号没有被加载。

My problem is that in my asp.net mvc website (in VS2012) the breakpoints "ARE" being hit in all my controller code, but they "ARE NOT" being hit in the actual javascript code in the aspx pages. The breakpoints in the javascript is showing the good old "This breakpoint will not be hit. The symbols have not been loaded".

香港专业教育学院检查所有的pdb文件,他们都在那里,和模块窗口说加载符号。

Ive checked all the pdb files and they are all there, and the module window says the symbols are loaded.

为什么实际的标记断点不会是被击中任何想法?

Any ideas why the actual markup breakpoints wouldnt be being hit?

感谢

推荐答案

你试过在JavaScript code加入了调试命令?我知道这通常是在虽然皱起了眉头。

Have you tried adding a 'debugger' command in the javascript code? I know this is usually frowned upon though.

例如:

 $(document).ready(function() {

         ....
         debugger;
         ....

});

您也可以尝试通过取消选中这两个在禁用脚本调试的,即可在IE中启用JavaScript调试从IE =>选项=>高级

You could also try to enable javascript debugging in IE by unchecking both of the Disable script debugging from IE => Options => Advanced.

参考:

这篇关于断点没有被击中在asp.net MVC JavaScript事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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