Detecting ASP.NET Debug mode

Posted by: Rick Strahls WebLog, on 20 Jan 2007 | View original | 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: 4308 | Hits: 226

Similar Posts

  • MPI Project Template for VS2010 more
  • EF4: Lazy Loading on By Default but what about pre Beta 2 Models? more
  • My History of Visual Studio (Part 6) more
  • Detecting Design Mode in Silverlight more
  • ASP.NET 4.0 Dynamic Data and Many to Many Entity Framework Entities more
  • Spec Explorer: A Model-Based Testing tool more
  • Web.UI 2008.2 Grid News: Grouping more
  • My History of Visual Studio (Part 2) more
  • My History of Visual Studio (Part 3) more
  • Debugging a Remotely Hosted Silverlight App 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