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
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: Debugger | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 4461 | Hits: 227

Similar Posts

  • ASP.NET 4.0 Dynamic Data and Many to Many Entity Framework Entities more
  • MPI Project Template for VS2010 more
  • Spec Explorer: A Model-Based Testing tool more
  • EF4: Lazy Loading on By Default but what about pre Beta 2 Models? more
  • My History of Visual Studio (Part 6) more
  • My History of Visual Studio (Part 2) more
  • My History of Visual Studio (Part 3) more
  • Silverlight, MVVM, Prism and More at VSLive Orlando more
  • RELEASED ASP.NET MVC 2 Preview 2 more
  • "ADO.NET Entity data model" or "edmx" or "L2E" debug visualizer 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