Silverlight debugging; not attaching process

debuggingsilverlight

I use Google Chrome as my default browser but prefer to use Internet Explorer for debugging Silverlight applications. I therefore set my web project properties thus and check the Silverlight debugger option.

enter image description here

This has worked fine for ages but since returning from vacation I find that the iexplore.exe process running silverlight is no longer attached to the debugger and I must attach it manually. When not debugging my app I can check the Debug | Attach to Process… dialog and see that there are no instances of iexplore.exe running. Then I hit F5 and start a debug session and look again, after which there are two instances, one of which is attached, but not the one running Silverlight. Once I attach the other too, debugging works fine and I can hit breakpoints and step through the code with no problem.

enter image description here

Any ideas on what I'm missing to get the debugger attaching to the correct process would be appreciated.

Best Answer

Chrome is my default OS browser, but I use IE for SL debugging.

What I do is find the ASPX page in the hosting Web project in the solution view of Visual Studio. Right-click the file and select Browse With. You'll be presented with a dialog. Select IE from this list of Browsers and press the Set as Default button. I then cancel out of this dialog. Now when VS starts debugging it uses IE! You'll need to undo your "Start external program" debugging options in the project (switch back to Current/Specific Page).

VS will occasionally "forget" this setting and switch it back to Chrome. Just repeat this process.