Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Debugging with Silverlight 4 and Firefox

When trying to debug a Silverlight 4 application in Visual Studio 2010 with Firefox as my browser, I am unable to hit any breakpoints. I get the message "breakpoint will not currently be hit".

like image 769
Craig Avatar asked May 11 '11 13:05

Craig


People also ask

Can you Debug a Silverlight application?

Right click on Silverlight project and select Debug tab from the project properties. Select "Out-of-browser application" radio button to enable Out of Browser debugging. Right click on Silverlight project and select "Set as Startup project". Once all configurations are completed run this application.

How do I enable debugging in Visual Studio?

To set Visual Studio debugger options, select Tools > Options, and under Debugging select or deselect the boxes next to the General options. You can restore all default settings with Tools > Import and Export Settings > Reset all settings.

How do I set Debug path in Visual Studio?

In Solution Explorer, right-click the project and choose Properties. In the Configuration list, choose Debug or Release. In the side pane, choose Linker > Debugging, then select options for Generate Debug Info. In most C++ projects, the default value is Generate Debug Information (/DEBUG).

How do I enable breakpoints in VS code?

Breakpoints. Breakpoints can be toggled by clicking on the editor margin or using F9 on the current line. Finer breakpoint control (enable/disable/reapply) can be done in the Run and Debug view's BREAKPOINTS section.


2 Answers

Here is the solution that worked for me when debugging was not working in Firefox:

  1. Type "about:config" into the address bar of Firefox
  2. Find the property named "dom.ipc.plugins.enabled"
  3. Change the value from true to false by double clicking
  4. Restart all Firefox browsers
  5. Go back to Visual Studio and start debugging!

Hope this saves someone else some time!

like image 169
Craig Avatar answered Oct 04 '22 23:10

Craig


Firefox hosts silverlight (and other plugins) in a sandboxed process called plugin-helper.exe.

Manually attach your debugger to the correct instance of this (it'll have "Silverlight" in the process type field), and you get your debugging back, and you get to keep your plugin sandboxing too.

EDIT: Looks like someone else sick of doing this by hand and wrote an VS2010 addon to automatically attach to plugin-helper.exe.

like image 43
Eltariel Avatar answered Oct 04 '22 23:10

Eltariel