How can I debug Windows Runtime data bindings? How can I debug Windows Runtime data bindings? wpf wpf

How can I debug Windows Runtime data bindings?


Another possible solution:

sealed partial class App : Application{    public App()    {        this.InitializeComponent();        this.Suspending += OnSuspending;        DebugSettings.BindingFailed += OnDebugSettingsOnBindingFailed;    }    private void OnDebugSettingsOnBindingFailed(object sender, BindingFailedEventArgs args)    {        new MessageDialog(args.Message).ShowAsync();    }    ...}

Original source: http://www.tozon.info/blog/post/2012/07/23/Debugging-WinRTXAML-bindings.aspx


If you look at the output window in VS you will see data binding trace messages on errors. You get this automatically for C++ applications and for managed applications you have to turn on unmanaged debugging to see them. This is an area we are looking to improve on, but for now you have the ability to turn them on and see the trace outputs.


In VS11 beta, the templated projects offer a way to help debug binding errors.

I wrote it up here http://www.kelvinhammered.com/?p=150