1
Vote

Problem with SafeNativeMethods.OutputDebugString

description

Hi,
 
I am trying to set up my application to use your diagnostics. I have a simple Unit Test which outputs a message via normal System.Diagnostics TraceEvent with the source/listener setup in the App.Config file. It words fine with InMemoryTraceListener and with DebuggerTraceListener (although that does not append a newline in the VS debug output window).
 
The problem I am having is with OutputDebugStringTraceListener. If I use that I don't get any output to the VS Debug window which is where I expected it. Am I simply looking in the wrong place?
 
I have traced it to TraceEventCore inside OutputDebugStringTraceListener and then it calls SafeNativeMethods.OutputDebugString, which I cannot trace.
 
I am running on Windows7 with .NET 4 installed (no other .NET framewords installed) using VS2010 Professional
 
Thanks for your help.

comments