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

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.
 
J

John Saunders

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.
 
R

Richard Grimes [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top