trying to debug npapi plugin in Chrome and Firefox , without success what is the right way?
Asked Answered
D

3

6

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

Danikadanila answered 17/5, 2011 at 7:33 Comment(1)
possible duplicate of npapi plugin debuggingSyphilology
S
12

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.

Syphilology answered 17/5, 2011 at 12:6 Comment(1)
Thanks allot this is the trick also was reading in the firebreath documention about itDanikadanila
F
0

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.

Flavio answered 17/5, 2011 at 7:38 Comment(1)
what to define and set i dont understand sorry ... i set the working directory to the directory where the plugin but still have the same problemDanikadanila
I
0

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.

Inhibitory answered 3/6, 2013 at 13:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.