Debugging A Silverlight Project With Windows 7 & VS2012

This is something I tend to forget from time to time.  When I look on the Internet I do find some help but the names do not line up exactly the same for me.  For this post I am using Windows 7 and Visual Studio 2012.

With Silverlight, if you start it in debug mode you may end up debugging the client or the server.  I find it much easier to do the following.

  1. Start Internet Explorer, I suppose you could use any browser of choice but for Silverlight debugging I prefer to stay in IE.
    1. Browse to your Silverlight application using http://localhost….  I get that url by running it in Visual Studio and just adding it to my favorites.
  2. In Visual Studio click on the Debug menu item at the top, then click on Attach to Process.
  3. There are three processes I attach it to:
    1. iexplore.exe
      1. Two of these, one is listed with the title of the Silverlight home page the other has a type of Silverlight
    2. w3wp.exe
      1. For my environment this has a Type of Managed and a User Name of IIS APPOOL\DefaultAppPool
  4. You may receive an Attach warning (see image below).  You selected this and know what it is so click Attach.


For me that’s it, I’m now debugging a large Silverlight 4 application and hitting my various break points.  I hope this helps some people other than just me.

About SheldonS

Web developer for over 15 years mainly with Microsoft technologies from classic ASP to .NET 4. Husband, father, and aspiring amateur photographer.

Posted on March 25, 2014, in Silverlight and tagged , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: