×

First time here?

You are looking at the most recent posts. You may also want to check out older archives. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS or email. Thank you for visiting!

Suppose you use Firefox as your default web browser and you are a Silverlight developer using Visual Studio.  You may have been frustrated at times in being able to get the debugger to attach to your breakpoints.  You’ve triple-checked that you are in debug mode, that the Silverlight checkbox is marked in the hosting web application’s property pages and it still is not breaking for you.  You stare at the dreaded empty red circle in Visual Studio reading the tooltip of “No debug symbols have been loaded…” a thousand times.

But it works in Internet Explorer.

I’ve faced this a few times and always forget the tip.  I’m recording it for my own posterity, but hopefully it will help others as well.

Here’s how to ensure the VS debugger attaches to the Silverlight app for debugging:

  • In Firefox address bar type about:config
  • Read the warning, choose your preference to always remind you or not and accept
  • In the search bar of the config options now type: npctrl
  • You should then see the entry: dom.ipc.plugins.enabled.npctrl.dll
  • Change the value from true to false (simply double-clicking will change this for you)
  • Restart Firefox

And your debugging should come back to normal.  It has frustrated me more than once.  Hopefully it helps some others.


This work is licensed under a Creative Commons Attribution By license.


8/16/2010 10:30 AM | # re: Debugging Silverlight with Visual Studio and Firefox
How about Chrome? Iv had similar issues with Chrome.
8/16/2010 11:14 AM | # re: Debugging Silverlight with Visual Studio and Firefox
Tim,

I ran into this as well when using Firefox, and found out that Firefox recently sandboxed their plugins on a different process - plugin-container.exe. Once I attached the debug process to this, I also got debugging symbols. This works fine when running the application in IIS, but not so well when launching with the internal ASP.NET server in VS...too often, I can't attach the debugger to this plugin executable before SL executes the code I wanted to break on...

I imagine that a similar issue applies to Chrome.
8/16/2010 4:12 PM | # re: Debugging Silverlight with Visual Studio and Firefox
I encountered the same problem, but I found a different solution: Right click on the project test page in the solution explorer and select "Browse With". The Browse With window allows you to select IE as the default browser for testing the project.
8/16/2010 11:35 PM | # re: Debugging Silverlight with Visual Studio and Firefox
Thanks to you Tim, my day is starting with a smile on my face...
8/17/2010 1:29 AM | # re: Debugging Silverlight with Visual Studio and Firefox
Great! if they would now make the build proces a zillion times faster, maybe we can get some work done
8/18/2010 7:19 AM | # re: Debugging Silverlight with Visual Studio and Firefox
Thanks a lot :)
8/18/2010 12:04 PM | # re: Debugging Silverlight with Visual Studio and Firefox
Unfortunately it does not work for me. I am using FF 3.6.8 and still looking for a solution :(
8/19/2010 10:46 AM | # re: Debugging Silverlight with Visual Studio and Firefox
Thanks for the tip. It would also be of value to give further insight about any other implications of changing that property, if any.
Gravatar
8/23/2010 3:30 AM | # re: Debugging Silverlight with Visual Studio and Firefox
[A slightly different Tim] - Spot on! Debugging and no symbols loaded was a major point of frustration. Glad I stumbled on this entry before going the next route.
8/23/2010 6:41 AM | # re: Debugging Silverlight with Visual Studio and Firefox
Thanks so much! This has been bothering me forever it seems!
8/23/2010 10:30 AM | # re: Debugging Silverlight with Visual Studio and Firefox
THANK YOU!!!
9/1/2010 3:37 PM | # re: Debugging Silverlight with Visual Studio and Firefox
KB2164913 fails to install. Why?
9/7/2010 1:02 AM | # re: Debugging Silverlight with Visual Studio and Firefox
thank you 4 this great tip!!! :)
9/12/2010 6:34 AM | # re: Debugging Silverlight with Visual Studio and Firefox
Thank you for this tip. I was very tired when looking for bugs in my code. I couldn't debug and I lost much time for this.
9/26/2010 12:30 PM | # re: Debugging Silverlight with Visual Studio and Firefox
OMFG, you're the man!
10/1/2010 3:14 AM | # re: Debugging Silverlight with Visual Studio and Firefox
thanks a lot, finaly it solved my problems..
10/24/2010 1:33 AM | # re: Debugging Silverlight with Visual Studio and Firefox
Thank you so much, you solved it!
Where do you get such info :)
11/1/2010 5:21 AM | # re: Debugging Silverlight with Visual Studio and Firefox
You’ve triple-checked that you are in debug mode, that the Silverlight checkbox is marked in the hosting web application’s property pages and it still is not breaking for you. You stare at the dreaded empty red circle in Visual Studio reading the tooltip of “No debug symbols have been loaded…” a thousand times. // exactly !!! Thank you very much for this topic :) I looked for solution more then 2 hours.
Gravatar
11/20/2010 1:34 PM | # re: Debugging Silverlight with Visual Studio and Firefox
Almost all day I tried to solve this issue.
Thank you very much!
12/23/2010 4:04 PM | # re: Debugging Visual Studio and Firefox
I try few weeks to change a browser at the vs 2010 and now i try secondly to work according to instruction and i don't success can you guide me? secondly, that you say firefox, you mean to url adress? thank you for your help
12/24/2010 3:05 AM | # re: Debugging Silverlight with Visual Studio and Firefox
Awesome man, you get points for this, not sure where you can use em, but you got em
2/25/2011 9:56 AM | # re: Debugging Silverlight with Visual Studio and Firefox
Thanks a lot......
I am new to Silverlight and ur soln helped me a lot.....
3/16/2011 7:59 AM | # re: Debugging Silverlight with Visual Studio and Firefox
"dom.ipc.plugins.enabled.npctrl.dll" doesn't seem to exist in Firefox 4.0 Beta RC1. I'm using Visual Web Developer 2008 Express Edition, and I'm stuck having to use Internet Explorer to debug, which thankfully isn't a huge deal. I don't have any problems debugging using version 2010 (of the free Web Dev edition).

For anyone reading this who's wondering how to change default browsers for Visual Studio (and not your entire OS), you apparently need to create a web project, or basically any project with an aspx page, then right click on the *.aspx file, and click "Browse with...". You'll see a list of available browsers now, and just set the default to the one you want. If your project doesn't have a *.aspx page, you'll have to create one that does just for this purpose. Hopefully I didn't google hard enough and there's a better solution.
3/29/2011 10:00 AM | # re: Debugging Silverlight with Visual Studio and Firefox
Yes, this property doesnt exit in Firefox4
4/19/2011 7:47 PM | # re: Debugging Silverlight with Visual Studio and Firefox
Just another humble muttering of thanks from a SilverLight newbie.
6/28/2011 1:32 AM | # re: Debugging Silverlight with Visual Studio and Firefox
Works for me. Thanks a bunch!
8/19/2011 2:15 AM | # re: Debugging Silverlight with Visual Studio and Firefox
Works on Firefox 6.0.
The entry is not present, but can be added.
Thankyou.
8/25/2011 9:55 AM | # re: Debugging Silverlight with Visual Studio and Firefox
Works on 6.0 with dom.ipc.plugins.enabled
Thanks.
9/29/2011 7:00 PM | # re: Debugging Silverlight with Visual Studio and Firefox
I am glad to read this post ,I own both Firefox and Silverlight in my PC,and I want to know more about bote of them ,and what you share solve my problem ,so much thankful for your kind.ring die pellet mill/a>
Gravatar
10/10/2011 8:14 PM | # re: Debugging Silverlight with Visual Studio and Firefox
Thanks to you Tim, my day is starting with a smile on my face...
камин своими руками
10/10/2011 8:18 PM | # re: Debugging Silverlight with Visual Studio and Firefox
Thanks a lot......
I am new to Silverlight and ur soln helped me a lot.....
регулировка пластиковых окон
11/22/2011 3:58 AM | # re: Debugging Silverlight with Visual Studio and Firefox
cant see dom.ipc.plugins.enabled.npctrl.dll in firefox 8.0
2/2/2012 11:12 AM | # re: Debugging Silverlight with Visual Studio and Firefox
Hello friends,
Normally debugging is not working in silverlight, so you have to make a small change in it just follow the following steps,

1. Set the breakpoints where you want.
2. Go to -Debug-Attach to process
3. Select the ( plugin-container.exe ) process-press Attach
4. Run your application.

Finally you can see, it works normally….
Thanks a lot,
chaitanyasalgar@live.com
4/15/2014 6:34 AM | # re: Debugging Silverlight with Visual Studio and Firefox
Thank you for your solution, but it didn't work perfectly for me.
I am using Visual Studio 2012 Premium version.
After making above changes, I am able to hit the debug point but when I click on F11, F10 or F5 suddenly browser gets closed and project stops.(Note : for IE, Firefox, Chrome)
It has frustrated me. Can anyone help me to solve it out?

 
Please add 3 and 6 and type the answer here:

DISCLAIMER:

The opinions/content expressed on this blog are provided "ASIS" with no warranties and are my own personal opinions/content (unless otherwise noted) and do not represent my employer's view in any way.