tags:

views:

101

answers:

4

Can we Debug Xaml in WPF? Is there any external tool or VS plugin which can do that?

A: 

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

Darin Dimitrov
is there any external tool which can do that?
sag
A: 

No it is not possible.

Ragunathan
+2  A: 

I don't agree with others that it's not possible to debug xaml; ya but its 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/

Get line numbers of XAML issues (Peter Himschoot): http://www.u2u.info/Blogs/Peter/Lists/Posts/Post.aspx?ID=183

More descriptive XAML exception details (Rob Relyea):
http://rrelyea.spaces.live.com/Blog/cns!167AD7A5AB58D5FE!1625.entry

More on XamlParseException (Laurent Bugnion): http://geekswithblogs.net/lbugnion/archive/2007/03/14/108728.aspx

Xaml Runtime Parsing Exceptions (c/o Erno de Weerd): http://blogs.infosupport.com/ernow/archive/2006/02/22/3899.aspx

“Debugging Dynamic XAML in Silverlight” (Julia Lerman): http://blogs.devsource.com/devlife/content/silverlight/debugging_dynamic_xaml_in_silverlight_1.html

How to debug triggers using Trigger-Tracing(Dan Lamping):
http://www.wpfmentor.com/2009/01/how-to-debug-triggers-using-trigger.html

Just use google/stackoverflow to know how to debug specific xaml issues.

akjoshi
Debugging Data Bindings in a WPF or Silverlight Application -http://blogs.msdn.com/b/wpfsldesigner/archive/2010/06/30/debugging-data-bindings-in-a-wpf-or-silverlight-application.aspx
akjoshi
+2  A: 

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.

IanR
A similar post, Check this out for more elobrated details - http://www.beacosta.com/blog/?p=52
akjoshi