Trace Writer & Synchronicity

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.

[ From Chris Szurgot's Blog ]

 

Isn’t synchronicity weird? Just this last week I’ve been looking for a way to do this.  What I really want is a light weight back channel for test results and trace output.  At the moment NUnitAddin uses .NET Remoting to send back test results from the test runner.  This works fine until you come to work on a channel sink multi-process application.  If you do you’ll find that outputting trace information affects the code you’re testing or doesn’t show up at all.  Most of the test runners accessible from the 'Test With...' in fact use stderr to communicate back to the addin.  This was originally because I couldn’t count on the .NET Remoting support in Mono and Rotor.  It has also proven to be useful when checking that the test runner process isn’t causing any side effects (in the case of Test With… .NET 1.0 or 1.1).  With this trace monitor code it looks like there is a better way!

No Comments