【发布时间】:2011-01-14 18:00:48
【问题描述】:
我有一个 ASP.NET 3.5 Web 应用程序。对于应用程序:
- 配置设置为“DEBUG;
- 为“DEBUG”配置选中“Define DEBUG constant”复选框;
- web.config 文件包含“true”作为“编译”节点的“调试”属性的值。
不过还是下面的代码:
#if ( _DEBUG )
const bool DebugMode = true;
#else
const bool DebugMode = false;
#endif
string strSettings = string.Concat("(DebugMode: ", DebugMode, ")");
将“DebugMode: False”放入结果字符串。同时我无法在调试模式下使用 VisualStudio 连接到应用程序...
问题:
如何获得调试模式的真正价值?
【问题讨论】: