Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to make DebugView see my program

How to make DebugView see my program

Scheduled Pinned Locked Moved C#
csharpdebuggingtutorialquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Susan Hernandez
    wrote on last edited by
    #1

    Does anyone know how to make DebugView from SysInternals "work"? I am trying to write a C# program in .NET 2003 and to print 2 lines:

    System.Diagnostics.Debug.WriteLine("I am debugging");
    System.Diagnostics.Trace.WriteLine("I am Tracing");

    I start dbgview.exe, run my program, and I do not see those comments (I checked that I am in debug mode). I have seen references to some kind of TraceListener, but I don't know what that is or where to set it up. If anyone knows what I'm talking about, could you please link me to some pertinent info? My quick search on google didn't give me anything. Thanks Sue

    A S 2 Replies Last reply
    0
    • S Susan Hernandez

      Does anyone know how to make DebugView from SysInternals "work"? I am trying to write a C# program in .NET 2003 and to print 2 lines:

      System.Diagnostics.Debug.WriteLine("I am debugging");
      System.Diagnostics.Trace.WriteLine("I am Tracing");

      I start dbgview.exe, run my program, and I do not see those comments (I checked that I am in debug mode). I have seen references to some kind of TraceListener, but I don't know what that is or where to set it up. If anyone knows what I'm talking about, could you please link me to some pertinent info? My quick search on google didn't give me anything. Thanks Sue

      A Offline
      A Offline
      Andy Brummer
      wrote on last edited by
      #2

      You can add a trace listener using your app.config file look here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrflistenerselement.asp[^]


      I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

      S 1 Reply Last reply
      0
      • S Susan Hernandez

        Does anyone know how to make DebugView from SysInternals "work"? I am trying to write a C# program in .NET 2003 and to print 2 lines:

        System.Diagnostics.Debug.WriteLine("I am debugging");
        System.Diagnostics.Trace.WriteLine("I am Tracing");

        I start dbgview.exe, run my program, and I do not see those comments (I checked that I am in debug mode). I have seen references to some kind of TraceListener, but I don't know what that is or where to set it up. If anyone knows what I'm talking about, could you please link me to some pertinent info? My quick search on google didn't give me anything. Thanks Sue

        S Offline
        S Offline
        S Senthil Kumar
        wrote on last edited by
        #3

        That's surprising. AFAIK, TraceListeners are useful if you want to monitor trace output within your application, they notify you when someone does a Trace.WriteLine or something similar. You should be seeing the messages in DebugView without doing anything special. Are you able to see the messages in VS .NET's Output window? Regards Senthil _____________________________ My Blog | My Articles | WinMacro

        S 1 Reply Last reply
        0
        • A Andy Brummer

          You can add a trace listener using your app.config file look here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrflistenerselement.asp[^]


          I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

          S Offline
          S Offline
          Susan Hernandez
          wrote on last edited by
          #4

          Thanks very much for the link. I can't seem to get it working yet, but I will keep looking around here. I put in a TextWriterTraceListener, and that does nothing; I put in an EventLogTraceListener, and that properly writes to the Event Log; I put in a DefaultTraceListener, and that throws an error. Thanks for the help. Sue

          1 Reply Last reply
          0
          • S S Senthil Kumar

            That's surprising. AFAIK, TraceListeners are useful if you want to monitor trace output within your application, they notify you when someone does a Trace.WriteLine or something similar. You should be seeing the messages in DebugView without doing anything special. Are you able to see the messages in VS .NET's Output window? Regards Senthil _____________________________ My Blog | My Articles | WinMacro

            S Offline
            S Offline
            Susan Hernandez
            wrote on last edited by
            #5

            I did not realize I could see the output there :-O. I fired it up, and yes, I can see the output in the output window. I still cannot see it in DebugView though! I tried the suggestion from the other poster to add a trace listener app.config section but that didn't seem to work. I can get a lot of information, though, just by using the output window. Man, I feel like an amateur!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups