determine app debug mode??

Discussion in 'ASP .Net' started by Arthur Dent, Jan 17, 2005.

  1. Arthur Dent

    Arthur Dent Guest

    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.
     
    Arthur Dent, Jan 17, 2005
    #1
    1. Advertising

  2. #If Not DEBUG Then
    'Do tracing
    #End If
     
    =?Utf-8?B?UnVsaW4gSG9uZw==?=, Jan 17, 2005
    #2
    1. Advertising

  3. Arthur Dent

    Arthur Dent Guest

    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" <> wrote in message
    news:...
    > #If Not DEBUG Then
    > 'Do tracing
    > #End If
    >
     
    Arthur Dent, Jan 17, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave
    Replies:
    0
    Views:
    672
  2. Ben Amada
    Replies:
    8
    Views:
    1,409
  3. =?Utf-8?B?TWF4?=
    Replies:
    0
    Views:
    479
    =?Utf-8?B?TWF4?=
    Feb 11, 2006
  4. Chuck P

    Determine Debug Mode

    Chuck P, Apr 13, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    1,822
    Steven Cheng[MSFT]
    Apr 18, 2006
  5. rbg
    Replies:
    0
    Views:
    442
Loading...

Share This Page