I’ve been neck deep in Silverlight development for the last couple of weeks. I’m finally starting to feel somewhat competent. Most of my struggles have been with XAML in general, so I think the steep learning curve applies to both Silverlight and WPF. One of the things I’ve been using struggling with the most is troubleshooting data bindings. The data binding system in Silverlight and WPF is pretty awesome, but it’s definitely not intuitive nor discoverable. When you force yourself to learn it, most of those issues melt away, but… buuuuut, debugging binding remains extremely difficult.
Today I discovered something that helps a TON. Binding errors are written to the Visual Studio Output Window! Check this out:
It’s not the most robust solution, but it’s definitely workable.
After discovering this, I did a bit more Googling around and found this handy article: How can I debug WPF bindings. He covers the Output Window approach there as well. For the record, I was not able to get the “Trace Sources” technique to work in Silverlight – only WPF.
Hope this helps someone else out