Use the debug output in application


Is it possible to use the debug output for sending debug data from the application.
I would like to be able to write some debug messages in my application and than log them at the debug output serial on the module.

Tried the System.Diagnostics.Trace.WriteLine()


You need to use PInvoke of the function OutputDebugString.

Small example:

static extern void OutputDebugString(string lpOutputString);