Wednesday, May 21, 2003 11:42 AM szurgot

Trace.Write & Debug.Write

(Note: This is a two part blog post. First part is a product announcement, second part is a question to developers)

I've written a small program called TraceMonitor that is used to capture output from Trace.Write & Debug.Write, etc. I'm re-releasing it to the development community in the hopes that some people can get some use out of it. It's based on DBMon.exe, but allows a finer granularity in filtering and display. It displays an aggregate log, and also splits output from each program into it's own log so you can view an individual session. You can get it at http://www.szurgot.net/projects/default.aspx under TraceMonitor.

Second Part:

I love the Trace.WriteLine & Debug.WriteLine functionality as a debugging tool. It's great to be able to add non-visible program output that can be captured and displayed by a secondary program. You can track changes to the data without having to drop into a debugger all the time, and remove the trace output with no impact to the actual program. It's obvious that somebody at MS likes it, because there is a decent amount of classes to allow for output, and granularity of output in the System.Diagonstic namespace.

My question is, what do other people use to capture this data. I know of three programs that do it (four if you count mine). One is dbmon.exe, a console based version that just spits everything out to a console window. One is SysInternals DbgView, which is pretty nice in that you can connect to another machine and view it's Trace/Debug/OutputDebugString output. The third, of course, is Visual Studio, which capture the info of a program running in Debug mode. Are there any others that people use? What makes the good or bad?

I wrote my TraceMonitor program (for one reason) because I couldn't stand the fact that alot of programs leave Trace/Debug statements in release versions, so my debugging gets all messed up when I'm running some of these programs. (MusicMatch dumps tons of output to the Trace, especially when ripping CDs, Visual Studio even sends a few lines, even though it's not much.) Does anybody else run into this problem, or are there other programs out there that allow you to filter out programs.

Anyway, please try out the program, and any comments, pointers to existing programs are greately appreciated.

Comments

# NUnitAddin

Wednesday, May 21, 2003 11:42 AM by TrackBack

NUnitAddin

# re: Trace.Write & Debug.Write

Wednesday, May 21, 2003 2:44 PM by Matt Griffith

You can filter the output in DbgView either by exception or inclusion. In other words you can tell DbgView what you want to see or what you don't want to see or both. If you use categories in your traces then it is fairly simple to get only what you want in DbgView.

But I prefer log4net [1]. It makes it even easier to see only the output you want to see.

[1] http://log4net.sourceforge.net

# re: Trace.Write & Debug.Write

Tuesday, May 27, 2003 1:40 AM by Jamie Cansdale

Hi Chris,

This has been soooooo useful! Thank you very much. Have there been any updates? You should blog some more about this. The world *needs* to know. ;) Would you mind if I integrated some of this into NUnitAddin? I've commented some more here...
http://dotnetweblogs.com/nunitaddin/posts/7390.aspx

Thanks, Jamie.

# DebugView/OutputDebugString Lives in .NET

Sunday, May 23, 2004 4:22 PM by TrackBack

# DebugView/OutputDebugString Lives in .NET

Sunday, May 23, 2004 5:11 PM by TrackBack

# DebugView/OutputDebugString Lives in .NET

Wednesday, April 23, 2008 9:00 AM by Matt Meleski's .Net Blog - The ABC's of .NET

Back in my COM+ VB6 days I always had a tough time to debug into my VB6 components that were running