Replicate functionality of DebugView in .NET - Global Win32 debug hooks?
See the question and my original answer on StackOverflowI wrote a tool that does it. It's not 100% equivalent to DebugView, but it has some other nice features (like the ability to colorize traces) :-).
It's available here: TraceSpy
Since it's 100% open source, it contains C# code that demonstrates how to do it.