TextWriterTraceListener writer = new TextWriterTraceListener(System.Console.Out);
             Debug.Listeners.Add(writer);

       

   System.Diagnostics.Debug.WriteLine("-------------------");