Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 562
Solid Performer Avatar asked Mar 03 '13 17:03

Solid Performer


2 Answers

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.

like image 186
Scott Munro Avatar answered Nov 18 '22 10:11

Scott Munro


I had the same with VS2012.. Looks like Visual studio got confused which IE to use - somehow in system I hade two instances of IE as target browser (In VS2012 window called "Browse With..") I removed all IE's from VS targets and restarted VS. Then only one instance of IE appeared after and debugger attaches normally.

like image 4
Vitaliy Markitanov Avatar answered Nov 18 '22 09:11

Vitaliy Markitanov