安装Internet Explorer 10后,如何在Visual Studio 2012中调试Silverlight 5应用程序?

问题描述:

更新到Internet Explorer 10后,我无法再在Visual Studio中调试Silverlight应用程序.我没有对系统进行任何其他更改,并且在更新到IE10之前,它在Internet Explorer 9上都可以正常工作.当我在Visual Studio中按F5时,IE10被启动,Silverlight应用程序在浏览器中运行,但在Silverlight代码中未击中断点.如果我按下shift + F5键(停止调试),浏览器将保持打开状态(用于关闭浏览器).另外,如果我在调试时关闭浏览器,它不会停止在Visual Studio中进行调试(以前总是这样做).我正在运行Win7 64.

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.

在Visual Studio 2010和Silverlight 4中也已重现此问题.

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

我在Visual Studio 2012和Silverlight 5中遇到了相同的问题.我得到的症状包括以下内容.

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

  1. 当我在Visual Studio中以调试模式启动应用程序时,将打开多个浏览器实例.
  2. 有时在浏览器中出现错误,提示无法加载该应用程序.
  3. Visual Studio会自动从浏览器分离并退出调试模式.
  4. 关闭Silverlight调试器(请参阅Web项目的属性对话框中的"Web"选项卡)似乎导致较少的其他问题.但是,这确实意味着我无法调试Silverlight代码.

要解决这些问题,我右键单击解决方案资源管理器中的aspx文件,然后选择浏览方式..."以打开以下对话框.

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

请注意,"Internet Explorer"有两个条目.

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

我同时删除了这两个设置(我暂时将Firefox设置为默认设置),从对话框中取消,然后重新打开它.此时,"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.