Trace: Can anyone suggest a good tool to catch trace messages?

  • Thread starter Thread starter Rukmal Fernando
  • Start date Start date
R

Rukmal Fernando

Hi,

I've been looking for a good Trace message monitoring tool to monitor trace
messages (through System.Diagnostics.Trace.WriteLine() etc).

I need it to collect traces from non-EXE code (esp. WebParts).

Can anyone recommend a good tool for my purpose?

Many thanks in advance.

Rukmal.
 
José Joye said:
Maybe the tools from SysInternals is what you are looking for. It will catch
all call make to Trace.WriteLine:

http://www.sysinternals.com/ntw2k/freeware/debugview.shtml

I took a look at the above URL, but it doesn't say anything about capturing
the output of Trace.WriteLine.

In order to catch the output of Trace.WriteLine, you will need to create an
instance of a class deriving from System.Diagnostics.TraceListener and then
add it to the Trace.Listeners collection.
 
John said:
I took a look at the above URL, but it doesn't say anything about
capturing the output of Trace.WriteLine.

Jose means the output from the standard DefaultTraceListener class which
generates messages using OutputDebugString. DebugView is an excellent tool
to do this. BTW OutputDebugString is a double edges sword because it couples
your application to the application reading the strings. If the reader
program is not written correctly (eg you put a large delay in the code that
reads the debug strings) then the thread writing the strings will be
blocked. DebugView is well written, of course :-). The VS.NET debugger will
also read OutputDebugStrings, but only for the process that is being
debugged. DebugView will do that for _all_ processes.

Richard
 
Back
Top