Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > determine app debug mode??

Thread Tools

determine app debug mode??

Arthur Dent
Posts: n/a
Hi. I have some code which traps application errors in my webapp, and emails
them to our development team.

I would like to do this though only when debug=false in the web.config.
In theory, if its in debug mode, we are working on it directly, and will see
the errors. When its not, its essentially in production mode, and errors
should be emailed to us.

How can i get out this setting?
Thanks in advance,
- Arthur.

Reply With Quote
Posts: n/a
#If Not DEBUG Then
'Do tracing
#End If

Reply With Quote
Arthur Dent
Posts: n/a
Thanks, but i dont think this will work for me. The code i want to be
conditional is in the global.asax.vb file. This will be always compiled
ahead, like an aspx.vb file. It is not dynamically compiled like an .aspx
file. Therefore this code would be skipped, and not in the binary. So even
if the debug setting in web.config is set to true, this code will not be
there to handle it, because it was never compiled in in the first place.

Any other suggestions?
Thanks in advance.

"Rulin Hong" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> #If Not DEBUG Then
> 'Do tracing
> #End If

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Determine Debug Mode Chuck P ASP .Net 2 04-18-2006 12:45 PM
Config Mgr Debug/Release and Web.config Compilation debug=true RonL ASP .Net 0 04-08-2006 03:50 PM
Under ASP.NET, is there any variable to determine debug or runtime mode? Ben Amada ASP .Net 8 11-09-2005 08:44 AM
debug Windows app works but, not web app =?Utf-8?B?R2lhbmNhcmxv?= ASP .Net 0 09-26-2005 06:16 PM
nuby: determine method passed and determine the receiver that received the method Peņa, Botp Ruby 1 01-24-2004 07:51 PM