views:

205

answers:

1

I am using Visual Studio 2010 to create a Silverlight 4 application.

I set a breakpoint in my code-behind, start the debug session from Visual Studio, and unfortunately, my breakpoint never gets hit.

So, I eventually I tried setting my default browser to Internet Explorer ... and lo and behold ... my breakpoint gets suddenly hit.

Is Chrome a supported browser for debugging Silverlight applications? If so, what am I missing in order to get this to work?

Or, is Internet Explorer the only supported browser when it comes to debugging?

+2  A: 

See my answer and this answer on another question.

You have to manually attach to the Silverlight process. Use the Debug menu and select Attach to Process... once you have started debugging (via F5 or the Debug/Start Debugging option).

Jeff Yates
Thanks, that did the trick. I thought it was completely lame until I noticed that Chrome launches an entirely new process for the Silverlight plugin.I still wish F5 just worked.
cplotts
@jeff, hats off to your editing skills - u \m/
Gollum
@Gollum: thanks, I try. :) Tomorrow, I might get a life.
Jeff Yates
@cplotts: Glad it helped. It would be nice if F5 just worked, but I'm not sure how it could without the browser helping the debugger determine which process was the right one. Perhaps the Silverlight runtime could identify the process in some singleton manner so the debugger can find it, but that would need special-case behaviour on the side of the debugger. Difficult thing to work out (that said, they managed it for the multi-process IE8 - so it can't be that hard).
Jeff Yates
@Jeff Yates ... exactly my thoughts. Thanks again.
cplotts