Debug.WriteLine and Trace.WriteLine

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob S

    #1

    Debug.WriteLine and Trace.WriteLine

    I am using Debug.WriteLine and Trace.WriteLine to output messages from a
    dll. This dll is used in an application.
    No matter whether i run the program in release mode or debug mode and
    whether i define/undefine DEBUG and TRACE compiler definitions, I still get
    the messages in the Output window.
    What might be the problem?

    Thanks
    Bob


  • Alvin Bruney [MVP]

    #2
    Re: Debug.WriteLine and Trace.WriteLine

    Where do you want the messages to show up? If you want to redirect to a file
    for instance, one way to do so is to add a tracelistener object.

    --
    Regards,
    Alvin Bruney
    ------------------------------------------------------
    Shameless Author Plug
    OWC Black Book 2nd Edition
    Exclusively on www.lulu.com/owc
    $24.99


    "Bob S" <staheli.bob@gm ail.comwrote in message
    news:u%23VML4sE IHA.4628@TK2MSF TNGP02.phx.gbl. ..
    >I am using Debug.WriteLine and Trace.WriteLine to output messages from a
    >dll. This dll is used in an application.
    No matter whether i run the program in release mode or debug mode and
    whether i define/undefine DEBUG and TRACE compiler definitions, I still
    get the messages in the Output window.
    What might be the problem?
    >
    Thanks
    Bob
    >

    Comment

    • Bob S

      #3
      Re: Debug.WriteLine and Trace.WriteLine

      I do not want to redirect messages. I just want to know why I am getting
      wrong behavior :
      I am using Debug.WriteLine and Trace.WriteLine to output messages from a
      dll. This dll is used in an application.
      No matter whether i run the program in release mode or debug mode and
      whether i define/undefine DEBUG and TRACE compiler definitions, I still get
      the messages.

      Bob




      "Alvin Bruney [MVP]" <some guy without an email addresswrote in message
      news:uUhJ%23xAF IHA.484@TK2MSFT NGP06.phx.gbl.. .
      Where do you want the messages to show up? If you want to redirect to a
      file for instance, one way to do so is to add a tracelistener object.
      >
      --
      Regards,
      Alvin Bruney
      ------------------------------------------------------
      Shameless Author Plug
      OWC Black Book 2nd Edition
      Exclusively on www.lulu.com/owc
      $24.99
      >
      >
      "Bob S" <staheli.bob@gm ail.comwrote in message
      news:u%23VML4sE IHA.4628@TK2MSF TNGP02.phx.gbl. ..
      >>I am using Debug.WriteLine and Trace.WriteLine to output messages from a
      >>dll. This dll is used in an application.
      >No matter whether i run the program in release mode or debug mode and
      >whether i define/undefine DEBUG and TRACE compiler definitions, I still
      >get the messages in the Output window.
      >What might be the problem?
      >>
      >Thanks
      >Bob
      >>
      >
      >

      Comment

      Working...