Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silverlight debugging; not attaching process

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.

like image 798
Steve Crane Avatar asked Feb 18 '11 11:02

Steve Crane


People also ask

How do I Debug a Silverlight application?

To check this in VS2010, right-click on the project and select properties, change to the Web tab and check the Silverlight option at the bottom of the page, in the debuggers section.

How do I enable debugging in Visual Studio?

In the Visual Studio toolbar, make sure the configuration is set to Debug. To start debugging, select the profile name in the toolbar, such as <project profile name>, IIS Express, or <IIS profile name> in the toolbar, select Start Debugging from the Debug menu, or press F5.

How do I open Silverlight in Visual Studio?

Step 1 − Open Visual Studio. Click the File menu, point to New and then click Project. Step 2 − A New Project dialog box will open. Under Templates, select Visual C# and then click Silverlight.


1 Answers

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.

like image 75
Aardvark Avatar answered Oct 19 '22 03:10

Aardvark