Virtual Developer Workshop: Containerized Development with Docker

The purpose of MsgTrace is to display tracing output.
MsgTrace displays tracing output of any application that uses Win32's OutputDebugString() function. (e.g TRACE() macros, all MFC output, ...)
MsgTrace can start monitoring the debug output of any running application. An applications can initiate its monitoring or the monitoring can be started using the MsgTrace.

MsgTrace consists of the following projects

MsgTracer: The tracing program where all output is displayed
MsgTracerPS: A proxy/stub DLL to allow access to the tracing component from other applications
MsgTracerLib: A small static library that must be linked to debuggee applications that will auto-attach to MsgTracer
MsgTracerTest: A small testing application that shows how to use MsgTrace

How to install MsgTrace

1. Copy the MsgTracer.exe and MsgTracerPS.dll onto your system
2. Register both executables:
   MsgTracer.exe /RegServer
   regsvr32 MsgTracerPS.dll
If you want to use the auto-attach feature copy inc/lib files
to a destiniation directory where your development environment can see them

Use MsgTrace with already built applications

1. Start debuggees that you want to monitor (MsgTrace can monitor as many debugees as you want)
2. Start MsgTracer.exe: the Tracer-Output-Window somes up and shows you an empty output list
3. Open processes dialog: either via menu [Tracing]/[Processes] or press on the monitor bitmap in the toolbar
4. Select process you want to monitor and press [Attach]
The process is attached to MsgTracer and shows all debugging output in the output list
Unfortunately you cannot detach anymore!

Use Auto-Attach-Feature with new applications

1. Include "MsgTracerLib.h"
2. Use the macro MSG_TRACE_ATTACHCURRENTPROCESS(); to automatically attach process to MsgTracer Use MSG_TRACE_WRITE( "Hello World" ); to trace the string "Hello World" Use MSG_TRACE_PRINTF( ( "Hello %d nd %s", 42, "World" ) ); to trace the string "Hello 42 nd World"
4. Link Debug version with MsgTracerLib.lib

Download source - 179 KB

Date Posted: 06.21.98


  • There must be another better program here

    Posted by Legacy on 01/08/2002 08:00am

    Originally posted by: Jamth Winson

    The idea to output the debug string in another application is good. But you have to link the other dll to finish this work, once again , I found a program named as "TraceWin" in MSDN(I'm not sure all version MSDN have this example, but April 2001 have yet) , it can do more better , I think.
    By the way , for a short time ago , I met a method to catch all Windows API function's call , that must a valid way to do the same thing.

  • Sigi Jeske --> his new email address?

    Posted by Legacy on 10/18/2001 07:00am

    Originally posted by: Chris Cavigioli

    Does anyone have Sigi's new (Oct-2001) email address? The old jeskes@msg.de no longer works.

  • Exception

    Posted by Legacy on 04/17/1999 07:00am

    Originally posted by: Ravi Kumaran

    It gives following messaage on attaching any process

    [000000C8/0000003F] : Process attached
    [000000C8/00000155] : Exception: first chance=1, code = 80000003, flags = 00000000

    I feel this tool is really useful. In applications where architecture is complex, it is difficult to debug and find out where exactly the problem is coming. In such cases this tool is very useful.

  • Win95/98 problem

    Posted by Legacy on 03/10/1999 08:00am

    Originally posted by: Krzysztof Dusza

    It seems that Message Tracer doesn't work with Win95/98 because
    some methods used in this app:


    are supported with NT only.
    It concerns 'psapi.dll' (and 'ntdll.dll').

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date