In any (non-web) .net project, the compiler automatically declares the DEBUG and TRACE constants, so I can use conditional compilation to, for example, handle exceptions differently in the vs release mode of debugging.
For instance:
#if DEBUG
#else
#endif
How to get the same behavior in an ASP.net project? It looks like the system.web / compilation section in the web.config file may be what I need, but how to check it programmatically? Or is it better for me to declare the DEBUG constant and comment on it in releases?
EDIT: I'm at VS 2008
Loris source
share