Reputation: 14786
I am trying to get my Silverlight application to write to the Output/Debug window in Visual Studio 2010.
I've tried System.Diagnostics.Debug.WriteLine
, and System.Diagnostics.Debugger.Log
, both of which seem to promise to write output to this window when the VS 2010 debugger is attached to the process.
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?
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.
Upvotes: 5
Views: 13831
Reputation: 13972
System.Diagnostics.Debug.WriteLine
does indeed do what you're asking. I would check several things.
Make sure:
Upvotes: 7