tags:

views:

493

answers:

1

In my web.config I have the standard element;

<compilation debug="true" defaultLanguage="c#">

I know I could use [Conditional("DEBUG")] on methods, or use some pre-compiler if statement like #if DEBUG, but what I am looking for is the built-in .NET framework setting that lets me know if the setting for debug in the compilation section.

I've seen it done before but can't find it or remember it.

Duplicate - Programmatically access the <compilation /> section of a web.config?

+2  A: 

HttpContext.Current.IsDebuggingEnabled (posted by Jason Diamond) was what I was looking for.

Thanks for your help Marc!

Dead account
You might want to close the question, then. And maybe chuck Jason a +1 ;-p
Marc Gravell
How do I close a question? (Sorry - bit of a noob)
Dead account