Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to XAML and WPF. Is there any way to Debug XAML?
For example like we debug code in C#'s .cs file.
Posted
Updated 6-Jan-11 23:48pm
v2

Pritesh Aryan wrote:
Is there any way to Debug XAML?


No. You cannot debug XAML (AFAIK). But you can use a trick to Debug Data Binding.

Write a Converter (CS / VB) and use it while binding to the control. Place a break point.

Update:

I have posted it as Trick Debugging Trick in XAML DataBinding[^]
 
Share this answer
 
v3
Comments
Pritesh Aryan 7-Jan-11 5:42am    
You can give me trick to Debug Data Binding.
#realJSOP 7-Jan-11 5:49am    
@Pritesh - google it. He gave you enough info to figure it out on your own.
Venkatesh Mookkan 7-Jan-11 6:09am    
Thanks @John.

@Pritesh, I have updated the Answer. Mark it as Answer if it really helpful.
Pritesh Aryan 7-Jan-11 6:22am    
@Venkatesh Mookkan,
ya but your link is broken.
please give me proper link...
Venkatesh Mookkan 7-Jan-11 6:24am    
Because, I just posted it as Trick in Tips/Trick section. It is still in Pending status. Sorry.
While Venkatesh Mookkan's has provided a good answer, another thing that probably makes sense is to add a handler to System.Windows.Application.DispatcherUnhandledException during initalization. This may provide valuable information including the callstack of the exception.

Regards
Espen Harlinn
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900