I have the following line in my code:
System.Diagnostics.Debug.WriteLine("Title:" + title + "title[top]: " + title[top] + "title[sub]: " + title[sub]);
When I debug I see it going to this line, but when I look at the output window in Visual Studio 2010 I don't see anything even though it shows for "Debug" and I ran using "debug > run". Why?
For me, I needed to do this to solve the problem:
Voila!
Check following items -
DEBUG
mode is selected while debuggingDebug
option is selected in Output window -Debug.AutoFlush = true
at the beginning of codeReference for Point #5 (Read the comment, It worked for that guy)
For me, this solved the problem:
(using
Trace
instead ofDebug
)In your app.config file, make sure you don't have a
<clear/>
element in your trace listeners.You will effectively be clearing the list of trace listeners, including the default trace listener used for Debug statements.
Here's what this would look like in your app.config file: