Results 1 to 1 of 1

Thread: VB.Net - View a running .NET application's trace messages

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148

    VB.Net - View a running .NET application's trace messages

    In the .NET framework you can emit tracing messages from an application by using the Trace class e.g.:
    VB Code:
    1. Trace.WriteLine("This is a test message")

    When you add a trace listener to your application using the .config file these trace messages can be written to a file etc. However, if you don't have any trace listener attached then the messages are sent using OutputDebugString.

    You can catch these output messages using a debugger - as implemented in (very simplified) code attached.

    Demonstrates:
    * ReadProcessMemory
    * DebugActiveProcess
    * WaitForDebugEvent
    * ContinueDebugEvent
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width