Saturday, January 8, 2011

Debugging a control at design time in Expression Blend


If on opening a user control or custom control in Expression Blend, you get an error which isn’t easy to decipher, chances are that at design time some code is getting executed which is throwing an exception. The quickest way to find the error is to open the same solution in Blend and Visual Studio. Then, in Visual Studio go to Debug>Attach To Process and select Blend.


Now, try opening the control in Blend. The point where the exception is being thrown will be hit in Visual Studio and you will realize what is going wrong.

No comments:

Post a Comment