Category Archives: Silverlight

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.

Image

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.

Advertisements

Getting Started With WCF RIA Services

There is a website, SilverlightShow that has a great multiple part tutorial for getting started with WCF RIA Services.