title: How to write to Visual Studio 2010 debug output window from Silverlight?
body: <p>I am trying to get my Silverlight application to write to the Output/Debug window in Visual Studio 2010.</p>
  
  <p>I've tried <code>System.Diagnostics.Debug.WriteLine</code>, and <code>System.Diagnostics.Debugger.Log</code>, both of which seem to promise to write output to this window when the VS 2010 debugger is attached to the process.</p>
  
  <p>I attach VS 2010 to the iexplore.exe hosting the Silverlight app in Silverlight mode, but I have yet to see any of the output I am trying to log.  I do see log messages for other things happening in the application; exceptions thrown, modules loaded, thread deaths, binding errors.  What do I need to do in the Silverlight app to log to the same place?</p>
  
  <p>I guess my alternative is to log to a global StringBuilder and break the process in the debugger and examine that, but that is much less convenient than looking at the information as it is logged in real time.</p>