In Silverlight 5 (Beta), one of the most interesting and important enhancement is the ability to set breakpoints in XAML and debug bindings. Before Silverlight 5 (and in WPF), debugging the binding is a difficult task, there is no direct way to put debug code.
Following are the options that we use to debug the binding errors.
- Look at the output window for all tyeh errors and try to resolve.
- Write dummy converters and attach to all the bindings. and set breakpoint inside the converter.
The binding xaml breakpoints in Silverlight 5 is a more flexible, powerful, and saves the time spend in debugging.
But the sad part is that WPF is not getting this ability to set breakpoint in XAML in the next version too. Pete Brow, Developer Division Community Program Manager at Microsoft mentioned this in his post.
He also mentioned that, "While from the outside they're very similar, the Silverlight and WPF codebases are very very different. It's actually a ton of work to implement some things in WPF due to those differences. In fact, most of Silverlight is native code whereas much of WPF is managed. If it were just an easy imp, the team would have done it.".
So, We have to wait till WPF 6(?) to get the same featuter.
d9dc5df1-09bd-4759-893e-2b6d6a3f5313|1|5.0
.Net Tips, wpf
WPF, Silverlight, Debugging, XAML