不能把在asp.net母版页文件断点 [英] Can't place a breakpoint in asp.net master page file

查看:118
本文介绍了不能把在asp.net母版页文件断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MVC的Web应用程序。我得到一个对象引用不设置到对象的实例下16行错误。这是一个母版页文件。当我尝试把一个断点在该行或文件的任何地方,我得到了这不是一个断点的有效位置错误。我点击了每一行,我不能把一个断点。我确实有它只有code线。

我如何在这个文件断点?

注:我可以将在code文件断点。在其他一些ASPX文件,我可以将一些code线,有些不是一个断点。
是否内嵌code必须在一个特殊的格式,以放置断点?
在Windows 7 64位使用VS 2010。

code:

  14号线:其中; DIV ID =<%= Model.PageWidth%GT;类=下;%= Model.PageTemplate%gt;中与GT;
第15行:LT; D​​IV ID =HD>
第16行:其中; H1>&下; A HREF =/>&下;%= Model.Workspace.Title%GT;&下; / A>&下; / H1>
第17行:其中H 2>&下;%= Model.Workspace.Subtitle%GT;&下; / H2>
第18行:LT; / DIV>


解决方案

如果您是在本地开发的脚本文件,将出现在Windows Internet Explorer的,你可以在动态生成的文件中添加断点那里。

I have an MVC web application. I get an "Object reference not set to an instance of an object" error in line 16 below. It's a master page file. When I try to place a breakpoint in that line or anywhere in the file, I get a "this is not a valid location for a breakpoint" error. I have clicked on every line and I can't place a single breakpoint. I do have lines which have code only.

How do I place a breakpoint in this file?

Note: I can place breakpoints in code files. In some other aspx files, I can place a breakpoint in some code lines and some not. Does the inline code have to be in a special format to place a breakpoint? Using VS 2010 in Windows 7 64bit.

Code:

Line 14:   <div id="<%= Model.PageWidth %>" class="<%= Model.PageTemplate %>">
Line 15:     <div id="hd">
Line 16:       <h1><a href="/"><%= Model.Workspace.Title %></a></h1>
Line 17:       <h2><%= Model.Workspace.Subtitle %></h2>
Line 18:     </div>

解决方案

If you are developing locally the "Script Documents" will show up under "Windows Internet Explorer" and you can add the breakpoint on the dynamically generated file there.

这篇关于不能把在asp.net母版页文件断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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