using Firefox with Firebug or IE8 ? try QDLog easy and quick way to get logging in a manner of seconds.
you can send log messages to the debug console , just add the following class to your project and your done
using System.Windows.Browser;
using System.Windows;
namespace QDLog
{
public class Log
{
public static void Debug(object message)
{
HtmlPage.Window.Eval("console.log");
var log = (HtmlPage.Window.Eval("console.log") as ScriptObject);
if (log != null)
{
log.InvokeSelf(message);
}
}
}
}
Example calls
namespace QDLog
{
public partial class Page : UserControl
{
public Page()
{
Log.Debug("Pre Initielize");
InitializeComponent();
Log.Debug("Post Initielize");
this.Loaded += new RoutedEventHandler(Page_Loaded);
}
void Page_Loaded(object sender, RoutedEventArgs e)
{
Log.Debug("Page loaded");
}
}
}
Output
quick and dirty.