There is a WPF application with code
#if DEBUG Console.WriteLine("Debug informathion"); #endif
How to redirect this Console.WriteLine to a separate window is the same as in a regular console application?
Note: the default output is output, but there is also information about debugging the program.