要检查preferred方式,如果asp.net web应用程序运行时处于调试模式? [英] A preferred way to check if asp.net web application is in debug mode during runtime?
本文介绍了要检查preferred方式,如果asp.net web应用程序运行时处于调试模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在编译的时候,我可以不喜欢
During compile time I can do a check like
#if DEBUG
Log("something");
#endif
不过,这将是pferred检查$ P $如果调试=false的
运行时在Web.config中设置?
But what would be the preferred to check if debug="false"
is set in Web.config during runtime?
推荐答案
HttpContext.IsDebuggingEnabled
<一个href=\"http://msdn.microsoft.com/en-us/library/system.web.httpcontext.isdebuggingenabled.aspx\">http://msdn.microsoft.com/en-us/library/system.web.httpcontext.isdebuggingenabled.aspx
这篇关于要检查preferred方式,如果asp.net web应用程序运行时处于调试模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文