How can I debug Silverlight 5 applications in Visual Studio 2012 after installing Internet Explorer 10?

Solid Performer picture Solid Performer · Mar 3, 2013 · Viewed 14.5k times · Source

I can no longer debug my Silverlight application in Visual Studio after updating to Internet Explorer 10. I made no other changes to my system and it was working fine with Internet Explorer 9 just before the update to IE10. When I hit F5 in Visual Studio, IE10 is fired up and the Silverlight application runs in the browser, but breakpoints are not hit in Silverlight code. If I hit shift+F5 (stop debugging), the browser remains open (this used to shut it down). Alternatively, if I close the browser while debugging, it doesn't stop debugging in Visual Studio (which it always did before). I'm running Win7 64.

This problem has also been reproduced in Visual Studio 2010 and Silverlight 4.

Answer

Scott Munro picture Scott Munro · Apr 9, 2013

I had the same problem with Visual Studio 2012 and Silverlight 5. The symptoms that I was getting included the following.

  1. Multiple browser instances would be opened when I started the application in debug mode within Visual Studio.
  2. I sometimes got an error in the browser saying that the application could not be loaded.
  3. Visual Studio would automatically detach from the browser and drop out of debug mode.
  4. Turning off the Silverlight debugger (see the Web tab in the properties dialog for the web project) seemed to result in less of the other problems. This did however mean that I could not debug Silverlight code.

To resolve these issues, I right clicked on an aspx file in the solution explorer and selected 'Browse With...' to open the following dialog.

Browse With Dialog

Note that there are two entries for 'Internet Explorer'.

I removed both (I set Firefox as the default temporarily to do so), cancelled out of the dialog and then reopened it. At this point, a new entry for 'Internet Explorer' had been added back in automatically. I made this the default and then had no further issues.