New to c# and .net, working in visual studio 2012. I want to have the ability to display values to an output window for debug purposes. I am very familiar with the watch windows, but that does not meet my current needs.
My most recent effort I took the exact sample from the msdn website.
Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));
Debug.AutoFlush = true;
Debug.Indent();
Debug.WriteLine("Entering Main");
Console.WriteLine("Hello World.");
Debug.WriteLine("Exiting Main");
Debug.Unindent();
This example can be found at http://msdn.microsoft.com/en-us/library/system.diagnostics.debug%28v=vs.71%29.aspx
I added a breakpoint on the very next line after the above code. When I hit the breakpoint I have no errors displaying and my output window has none of the anticipated content. I do have the using System.Diagnostics set.