破发点ASPX页面 [英] Break points aspx pages

查看:122
本文介绍了破发点ASPX页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您在.aspx页的服务器变量设置一个破发点怎么办。例如。

How do you set a break points in server tags in .aspx pages. e.g.

<%   dim breakhere =new object() %>

Web应用程序在调试模式下运行的&LT;编译调试=真正的... 在web.config中。但是,页面上显示:

The web application is running in debug mode with the <compilation debug="true" ... in the web.config. But the page says:

该断点目前不会有
  击中。没有符号已经加载了
  这份文件。

The break point will not currently be hit. No symbols have been loaded for this document.

还有什么我需要设置?

推荐答案

,而不是直接设置断点,你可以使用

instead of setting the breakpoint directly, you could use

<%  System.Diagnostics.Debugger.Break();

    // more code here...

     %>

也许一个更好的建议,虽然是没有把内嵌code在您的标记 - 而不是把它放在一个方法在code-隐藏文件,然后调用从您的标记该方法。在你在$ C $方法C-的背后,则可以使用断点,你通常会。

Maybe a better suggestion though is to not put inline code in your markup - instead put it in a method in the code-behind file, and then call that method from your markup. In your method in the code-behind, you can use the breakpoints as you normally would.

这篇关于破发点ASPX页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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