【问题标题】:Getting the .NET framework setting for <compilation debug="true">获取 <compilation debug="true"> 的 .NET 框架设置
【发布时间】:2010-10-01 18:58:15
【问题描述】:

在我的 web.config 中,我有标准元素;

<compilation debug="true" defaultLanguage="c#">

我知道我可以在方法上使用 [Conditional("DEBUG")],或者使用一些像 #if DEBUG 这样的预编译器 if 语句,但我正在寻找的是内置的 .NET 框架设置,它可以让我知道是否在编译部分设置调试。

我以前看过它,但找不到或不记得了。

【问题讨论】:

标签: c# .net debugging


【解决方案1】:

HttpContext.Current.IsDebuggingEnabled(由 Jason Diamond 发布)正是我想要的。

感谢您的帮助,马克!

【讨论】:

  • 那么您可能想结束这个问题。也许让杰森+1 ;-p
  • 如何关闭问题? (对不起——有点菜鸟)
猜你喜欢
  • 1970-01-01
  • 2015-08-25
  • 1970-01-01
  • 2021-06-29
  • 2017-12-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多