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".
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.
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.
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).
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.
Here is the solution that worked for me when debugging was not working in Firefox:
Hope this saves someone else some time!
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With