我如何使用Chrome调试我的MVC3网站? [英] How can I debug my MVC3 site with Chrome?
本文介绍了我如何使用Chrome调试我的MVC3网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在构建一个ASP.NET MVC3网站。我的.cshtml文件中有一些javascript:
I'm building an ASP.NET MVC3 website. I have some javascript in my .cshtml file:
<div>hello!</div>
<script type="text/javascript">
$(document).ready(function () { alert("ready!"); })
</script>
谷歌浏览器的内置调试器没有看到这个javascript代码片段,所以我无法调试它。
Google Chrome's built-in debugger doesn't see this javascript snippet, so I can't debug it.
如何在谷歌浏览器的内置调试器中的JavaScript代码片段中设置断点?
How can I set a breakpoint in this javascript snippet in Google Chrome's built-in debugger?
推荐答案
奇怪的是,对我很好用:
Weird, works great for me:
- 转到
脚本
- Go to the
Scripts
tab - You will see a dropdown list of all referenced javascript files, select the one that corresponds to the inline scripts (
:9038
in my screenshot below) - Set your breakpoint
你也可以考虑 FireBug 作为替代。
You might also consider FireBug as an alternative.
这篇关于我如何使用Chrome调试我的MVC3网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文