Silverlight 4 debugging and Firefox 3.6.4+

I’ve been stuck on this for a few days.

At the moment, Firefox 3.6.4 (and newer) have a new functionality called ‘Crash protection’, which is quite nice.

For customers.

It now runs the plugins in a separate process called ‘plugin-container.exe’ (look in your task manager).

Task manager plugin-container.exe

But for developers it’s quite the hassle, since Visual Studio attaches itself to Firefox but NOT to this process. So no more Silverlight debugging for you!

Luckily there are two options for you!

The first option is the most straight forward, but has to be done each time. Use Visual Studio to attach itself to plugin-container.exe, refresh the website, and BAM, you’re up and running!

Attach to Process

On the next screen click ‘plugin-container.exe’. There might be 2, if so, select the one with ‘Silverlight’ in the ‘Type’ column:

Attach to Process Window

And hit ‘Attach’.

While this solution is adequate for when you need to debug it one time at a day, but for me, I only debug in Firefox, and when necessary I use Internet Explorer. For that you can go to your ‘about:config’ in Firefox, disable ‘dom.ipc.plugins.enabled.npctrl.dll’ (set it to false).

2 thoughts on “Silverlight 4 debugging and Firefox 3.6.4+”

  1. You can also set Internet Explorer as the default browser for testing your Silverlight application in Visual Studio 2010.

    The disadvantage of using Firefox, in SL’s case, is that often enough the browser won’t download the latest version of the application. Apparently Silverlight doesn’t play nice with Firefox, thanks to the latter’s caching functionality. IE, on the other hand, hasn’t shown any problems yet, for me anyway.

    It’s a mess either way; working with our without Firefox, oh well.

Comments are closed.