Detecting ASP.NET Debug mode

Posted by: Rick Strahls WebLog, on 20 Jan 2007 | View original | NEW Bookmarked: 0 time(s)

Ah the beauty of a big framework <s>. I was doing some work on an internal GZip compression handler and one thing I needed to know is whether the application is running in Debug mode. Its easy to do this IF you know where to look:   // *** Optimize the script by removing comment lines and stripping spaces if (!HttpContext.Current.IsDebuggingEnabled)                Script = OptimizeScript(Script);      It...

Advertisement
Category: Debugger | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 3053 | Hits: 213

Similar Posts

  • New article: How to detect and avoid memory and resources leaks in .NET applications more
  • RELEASED ASP.NET MVC 2 Preview 2 more
  • 5 Minute Overview of MVVM in Silverlight more
  • Html Encoding Code Blocks With ASP.NET 4 more
  • Spec Explorer: A Model-Based Testing tool more
  • My History of Visual Studio (Part 6) more
  • My History of Visual Studio (Part 7) more
  • Silverlight, MVVM, Prism and More at VSLive Orlando more
  • Web.UI 2008.2 Grid News: Grouping more
  • Web.UI 2008.2 Grid News: Grouping more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD