6
votes

i build working npapi pluging using firebreath framework , and its working just fine.
i compiled in debug mode . did regsvr32 myddl.dll and restart the Chrome browser.
now in visual studio 2008 express and did attached to process attached to Chrome process
but when i try to set breakpoint in the dll source code it gives me the error:

The breakpoint will not currently be hit. No symbols have been loaded for this document.

why this is the source of the plugin and its in debug mode .
this is also happen when i try with firefox browser , so i guess its something with my visual studio configuration

3
possible duplicate of npapi plugin debuggingsmorgan

3 Answers

12
votes

Chrome (and also Firefox) runs plugins out of process, so you aren't actually attaching to the process that has your plugin code. Run Chrome with the --plugin-startup-dialog flag, and when your plugin process starts Chrome will give you the process ID of the plugin process and then pause the plugin process and wait for a debugger to attach.

0
votes

This is something I have noticed recently...

Please check your settings in the configuration manager. Make sure you have set this up for your project in debug mode so it know where to look for your symbols.

0
votes

There are two cases to your above problem. One, that your code and compiled dll have different code(even a slight change in line numbers can be considered different code). So make sure your plugin is up-to-date. Second, you are attaching your visual studio to the wrong process. Try debugging using google chrome using the following steps -
1. Open command prompt and start google chrome with following options --plugin-startup-dialog --wait-for-debugger. Eg -
"C:\program files (x86)\Google\Chrome\Application\chrome.exe" --plugin-startup-dialog --wait-for-debugger ""
2. This will pop up a dialog waiting for you to attach to this chrome process. After attaching to this process to the process id provided by chrome, you'll be able to use breakpoints in debug mode.