I am trying to create a BHO with the ATL Project in Visual Studio 2010. I am following this article: http://msdn.microsoft.com/en-us/library/bb250489.aspx
When I get to the point "Take a Test Drive" - I press F5 , the project compiles successfully, but I get an error popup : "Unable to start program '...HelloWorld.dll'
I tried the solution which is described here: Unable to start program ATL Project C++ .
I set "C:\Program Files (x86)\Internet Explorer\iexplore.exe" in "Project - Properties - Configuration Properties - Debugging - Command". I press F5 and I get another warning:
"Debugging information for 'iexplore.exe' cannot be found or does not match. Cannot find or open the PDB file
Do you want to continue debugging?"
I answer "YES" and IE is started, all my breakpoints are disabled and the debugger exits. If I try to attach to a running instance of IE the debugger does not exit, but again all my breakpoints are disabled.
What is the right way to debug a C++ BHO DLL with Visual Studio 2010. My version of IE is 11.
Using Process Explorer from Sysinternals, you can find the PID of the iexplore.exe process hosting the page, as Process Explorer is able to display the name of each "tab" attached to an IE process, when you hoover the mouse on the process.
Once PID identified, use Attach to Process.
EDIT: if you want to debug your BHO from start (before SetSite et al), there is an ugly hack: use
MessageBox
inDllMain
(ATTACH_PROCESS) and make it display the current PID). Attach to Process and then close the Message Box.