_consoleStreamWriter = new TextBoxStreamWriter(txtConsoleOutput, tabConsole); _debugStreamWriter = new TextBoxStreamWriter(txtDebugOutput, tabDebugPage); TextWriterTraceListener writer = new TextWriterTraceListener(_debugStreamWriter); Debug.Listeners.Add(writer); Debug.WriteLine("Now redirecting debug output."); // Redirect the out Console stream Console.SetOut(_consoleStreamWriter); Console.WriteLine("Now redirecting console output."); To prevent application crash when writing to the Textbox (which will happen with the default code found elsewhere), do the below: public class TextBoxStreamWriter : TextW...