I am unable to hit a breakpoint on the server side of a Silverlight web application. I know the code executes as I can break on the asynchronous callback with what I was expecting. It's only my machine with this issue.
I am aware this seems to be a common question, however all the answers to the ones I have seen have not helped me, including:
I am using Visual Studio 2010 (.NET 4), Silverlight 4, and using IIS (I think 6, cannot remember) to host the site.
Interesting behaviour I have discovered (may help to diagnose):
Any suggestions will be very appreciated!
UPDATE: Thanks for all the suggestions. I decided to format C:\ instead of spending more time playing around, as my machine needed it badly anyway. I still am not sure what the problem was, but it is working now.
I did try a couple of other things before this such as deleting the .sou files, and checking I was running the same version of Silverlight, mentioned in this blog post, with no luck. Hopefully this will act as a checklist for people with this problem in the future.
Right click on Silverlight project and select Debug tab from the project properties. Select "Out-of-browser application" radio button to enable Out of Browser debugging. Right click on Silverlight project and select "Set as Startup project". Once all configurations are completed run this application.
If the breakpoint is in a library that is only used in one function in your main assembly, the symbols will not be loaded (and it will show the breakpoint as not being hit) until that function is called.
Click the button next to the Enable Cross-Triggering check box. The Cross Trigger Breakpoints dialog box appears. You can create new breakpoints, edit or remove existing breakpoints using the Cross Trigger Breakpoints dialog box. The table below briefly describes the options available on the dialog box.
As you are working with Silverlight, you should not attach to w3wp.exe. This is a worker process for IIS and is not relevant to your Silverlight code. The browser process actually executes your Silverlight code. Could you try opening your Silverlight hosting page in IE and then use Visual Studio to attach to iexplore.exe (checking again for Silverlight as the code type you want to debug)?
This should allow you to debug your Silverlight code without any problems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With