where Debug.Writeline() throws the output - c# .net

225
Views
1
Answers

Where is Debug.Writeline() output is displayed in C# .Net. I am using visual studio 2010.

System.Diagnostics.Debug.WriteLine( "Hello via Debug!" );
edit | flag
Mad Maddy
Asked on: Feb 14, 2012 at 3:12AM

1 Answers

131
1
131

The messages are displayed in Output Window

View --> Output Window. or Ctrl+Alt+O

You can also write it to the text files if you want.

//write to Output window
   
Debug.WriteLine("This is error {0} - Debug write",error);

//write to text file
   
TextWriterTraceListener[] listeners = new TextWriterTraceListener[]
   
{
   
new TextWriterTraceListener("C:\\debugwritefile.txt")
   
}
edit | flag
Gokul A
Answered on: Feb 14, 2012 at 3:19AM

Post your Answer

Search

Welcome to Ask Amoeba!
This is 100% free and interactive site for sharing professional Questions and Answers, Opensource projects, Interview questions.
Learners, beginners, Experts stop and share your knowledge and ideas!

Browse Categories

Browse Tags