By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,953 Members | 1,131 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,953 IT Pros & Developers. It's quick & easy.

determine app debug mode??

P: 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.
Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
#If Not DEBUG Then
'Do tracing
#End If

Nov 19 '05 #2

P: 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" <Ru*******@discussions.microsoft.com> wrote in message
news:03**********************************@microsof t.com...
#If Not DEBUG Then
'Do tracing
#End If

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.