为什么我不能设置在ASP.NET视图断点? [英] Why can't I set a breakpoint in a ASP.NET view?
问题描述
如果我在编code(例如在一个动作)设置断点,然后我就可以步,最终我通过查看生成步进。
If I set a breakpoint in the compiled code (for instance in an action), I can then step through, and eventually am stepping through the generation of the View.
我发现这个有用的几次,但它是单调乏味的,你要踩通过大量code的到达那里。
I've found this useful a couple of times, but it's tedious as you have to step through a lot of code to get there.
不过,我不能设置鉴于断点。我刚收到消息这不是一个断点的有效位置
从VS2008。这是为什么?
However, I can't set a breakpoint in view. I just receive the message 'This is not a valid location for a breakpoint'
from VS2008. Why is this?
推荐答案
右键上的$ C $单击C要打破和进入断点 - >插入断点。
Right click on the code you want to break on and go to "Breakpoint -> Insert Breakpoint".
为什么呢?必须是与你的不是一个纯粹的code文件工作和击中左侧边栏不知道用哪个code块面。
Why? Must have something to do with the face your not working with a pure code file and hitting the left sidebar doesn't know which block of code to use.
这篇关于为什么我不能设置在ASP.NET视图断点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!