Message Tracer

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
 MsgTracerLib.h
 MsgTracerLib.lib
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



Comments

  • There must be another better program here

    Posted by Legacy on 01/08/2002 12: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.

    Reply
  • Sigi Jeske --> his new email address?

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

    Originally posted by: Chris Cavigioli

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

    Reply
  • Exception

    Posted by Legacy on 04/17/1999 12: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.

    Reply
  • Win95/98 problem

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

    Originally posted by: Krzysztof Dusza

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

    EnumProcessModuless
    EnumProcesses
    GetModuleBaseName

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

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

Top White Papers and Webcasts

  • Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

  • The proliferation of cloud computing options has begun to change the way storage is thought about, procured, and used. IT managers and departments need to think through how cloud options might fit into and complement their onsite data infrastructures. This white paper explains cloud storage and backup, providing advice about the tools and best practices for its implementation and use. Read this white paper for some useful takeaways about how to take advantage of cloud storage for high availability, backup and …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds