开发者

Can we Debug Xaml in WPF?

Can we Debug Xaml in WPF? Is there any external tool or VS plugin whi开发者_开发问答ch can do that?


I've occassionally found these tricks here useful...

http://www.wpftutorial.net/DebugDataBinding.html

...particularly the second one where you use a dummy value converter to break in to the debugger. It's useful for seeing exactly what objects are being bound, etc.


I don't agree with others that it's not possible to debug XAML, but it's true that there are no powerful tools available for this.

As Mark says in this post - http://markegilbert.wordpress.com/2008/03/15/debugging-xaml/

So, the simple answer is yes, you can debug problems with XAML. The longer, more qualified answer is that while it’s possible, the support isn’t terribly robust yet but should improve with newer dev environments (Visual Studio, Expression Blend, etc.).

Tips on how to debug and learn about WPF(Josh Smith): http://joshsmithonwpf.wordpress.com/2007/03/29/tips-on-how-to-debug-and-learn-about-wpf/

Wayback Link | Get line numbers of XAML issues (Peter Himschoot):

Simply add this to your project file:

<!-- under the <PropertyGroup> tag -->
<XamlDebuggingInformation>true</XamlDebuggingInformation>

Now we at least get line number information on the problem :)

More descriptive XAML exception details (Rob Relyea)

More on XamlParseException (Laurent Bugnion)

  • Can we Debug Xaml in WPF?

Wayback Link | XAML Runtime Parsing Exceptions (c/o Erno de Weerd)

  • Can we Debug Xaml in WPF?

Wayback Link | How to debug triggers using Trigger-Tracing(Dan Lamping)

  • Can we Debug Xaml in WPF?

Debugging Dynamic XAML in Silverlight (Julia Lerman)

Just use google/StackOverflow to know how to debug specific XAML issues.


XAML is a declarative language and not imperative so I don't see how debugging it could be possible.


No it is not possible.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜