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
Select view>>Output to open output window.
In the output window, you can see the result
When issue happening on Mac VS 2017 (Which I faced).
Run your application code now.
If you are developing a command line application, you can also use Console.ReadLine()
at the end of your code to wait for the 'Enter' keypress before closing the console window so that you can read your output. However, both the Trace and Debug answers posted above are better options.
If you want Console.WriteLine("example text")
output to show up in the Debug Output window, temporarily change the Output type of your Application from Console Application to Windows Application.
From menus choose Project + Properties, and navigate to Output type: drop down, change to Windows Application then run your application
Of course you should change it back for building a console application intended to run outside of the IDE.
(tested with Visual Studio 2008 and 2010, expect it should work in latter versions too)
Old Thread, But in VS 2015 Console.WriteLine does not Write to Output Window If "Enable the Visual Studio Hosting Process" does not Checked or its Disabled in Project Properties -> Debug tab
Console
outputs to the console window and Winforms applications do not show the console window. You should be able to use System.Diagnostics.Debug.WriteLine
to send output to the output window in your IDE.
Edit: In regards to the problem, have you verified your mainForm_Load
is actually being called? You could place a breakpoint at the beginning of mainForm_Load
to see. If it is not being called, I suspect that mainForm_Load
is not hooked up to the Load
event.
Also, it is more efficient and generally better to override On{EventName}
instead of subscribing to {EventName}
from within derived classes (in your case overriding OnLoad
instead of Load
).