Search code examples
debuggingsilverlight-4.0stack-overflow

Debug problem occurs sometimes in Silverlight when in Chrome


I am using a dedicated test SL web application that hosts SL object I am debugging. I am debugging using basic F5 and use browser Google Chrome. Sometimes a bug happens, how I reproduce it.

I was running build->debug like 100 times already, but then I made a mistake that caused StackOverflowException and happened in main page constructor and afterwards when I rebuild and hit F5 it says no symbols have been loaded. Note that NOTHING has changed , I use the same 2 buttons combinations rebuild solution-> start debugging.

In order for debug to continue to attach I need to close XAML main page , open it again (in visual stuido) and hit rebuild ->f5 again, afterwards it works fine. (found this solution after SOME time)

I am not sure whats bugged but it appears to be a bug somewhere in SL to me. Question is - whats going on maybe someone can explain.


Solution

  • Actually error was super simple, I wasn't understanding how "exactly" xap works, it was a little more magical to me than it is. I just needed to rebuild & clear cache in browser ( chrome in this case) to attach successfully. For some reason I thought that local version doesn't require clear cache call.

    Actually chrome is pretty bad to debug silverlight so I recommend IE for this sole purpose, sometimes debugger simply fails to attach to chrome, in that case you usually need to do this by attach to process - choose chrome with silverlight name there.