Trying to debug the npapi plugin in Chrome and Firefox, without success, what is the right way?

I am creating a working npapi-pluging using firebreath framework and its work is excellent.
i compiled in debug mode. made regsvr32 myddl.dll and restarted the Chrome browser.
now in visual studio 2008 Express and attached to the process attached to the Chrome process

but when I try to set a breakpoint in the dll source code, it gives me an error:

At the moment, the breakpoint will not be hit. No characters have been downloaded for this document.

why is it the source of the plugin and its in debug mode.
this also happens when I try to use the Firefox browser, so I think this is something with my visual studio configuration

+6
source share
3 answers

Chrome (as well as Firefox) launches plugins from the process, so you don’t actually join the process with your plugin code. Launch Chrome using the --plugin-startup-dialog flag, and when your process connects to Chrome, you will get the plugin process ID, then pause the plugin process and wait for the debugger to debug.

+12
source

This is what I recently noticed ...

Check the settings in the configuration manager. Make sure you configure this for your project in debug mode so that it knows where to look for your characters.

0
source

There are two problems for your problem. Firstly, your code and compiled dlls have different code (even a small change in line numbers can be considered as different code). So make sure your plugin is updated. Secondly, you attach your visual studio to the wrong process. Try debugging using google chrome by following these steps -
1. Open a command prompt and run google chrome with the following options --plugin-startup-dialog --wait-for-debugger. For instance -
"C: \ program files (x86) \ Google \ Chrome \ Application \ chrome.exe" --plugin-startup-dialog --wait-for-debugger ""
2. A dialog box will appear in which you can connect to this chrome process. After attaching the process identifier provided by chrome to this process, you can use breakpoints in debug mode.

0
source

Source: https://habr.com/ru/post/888289/


All Articles