I wrote following code
Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));
Debug.AutoFlush = true;
Debug.Indent();
Debug.WriteLine("test");
Nothing is output in output window What's wrong?
I wrote following code
Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));
Debug.AutoFlush = true;
Debug.Indent();
Debug.WriteLine("test");
Nothing is output in output window What's wrong?
Possible causes that I can think of:
I use debug output in a slightly different way to your example:
Trace.Listeners.Clear();
DefaultTraceListener listener = new DefaultTraceListener();
Trace.Listeners.Add(listener);
Debugger.Log(1, "test", "oops i've crashed");
The debug output does go to the output window. Make sure that you are running as "debug" and not "release"
Also worth checking: right-click in the output window, and ensure "Program output" is checked.