I have put some Console.WriteLine
calls in to test, but they aren\'t appearing in the output box?
public static ArrayList myDeliveries = new Arr
Try to uncheck the CheckBox “Use Managed Compatibility Mode” in
Tools => Options => Debugging => General
It worked for me.
If you intend to use this output in production, then use the Trace class members. This makes the code portable, you can wire up different types of listeners and output to the console window, debug window, log file, or whatever else you like.
If this is just some temporary debugging code that you're using to verify that certain code is being executed or has the correct values, then use the Debug class as Zach suggests.
If you absolutely must use the console, then you can attach a console in the program's Main
method.
Using Console.WriteLine( "Test" );
is able to write log messages to the Output Window (View Menu --> Output) in Visual Studio for a Windows Forms/WPF project.
However, I encountered a case where it was not working and only System.Diagnostics.Debug.WriteLine( "Test" );
was working. I restarted Visual Studio and Console.WriteLine()
started working again. Seems to be a Visual Studio bug.