If you ever wonder why the breakpoints in your Silverlight application are never hit, it is simply because you have not enabled debugging for it. The following steps describe how you can enable debugging for your Silverlight apps.
From the Solution Explorer, select the web project that hosts your Silverlight XAP files, and then Double-click on the Properties icon (see screenshot below) in the project.
This will bring up the Properties page for you web project. Now all you need to do is click on the Web tab, scroll to the bottom of the tab page, and ensure that the Silverlight checkbox is ticked.
It’s that simple! Now you can litter your code with breakpoints and they will surely get hit where necessary.
Stuart
/ June 12, 2010Wow, nice tip. Thanks.