"The breakpoint will not currently be hit" error while debugging a mixed mode application (c# and unmanaged c++)
- by user1678403
While debugging a mixed mode application in VS2010, the breakpoint set on a line of code contained in an unmanaged c++ dll source file (called from a managed c# wrapper class) shows the infamous "The breakpoint will not currently be hit. No symbols have been loaded for this document" info message when hovering the mouse over the breakpoint on the line in question. The breakpoint itself is a red circle with a yellow info triangle instead of the usual solid red orb. Of course, the breakpoint isn't hit when the debugger is executed. Most answers I've found for this warning indicate the breakpoint hasn't been set properly, or that the expected dll is not being loaded, or that the associated pdb file is not located in the correct location, etc. etc. This is not the problem. The application does load and execute the referenced dll correctly. I've verified that the correct pdb file, with the same file date as its dll, is located in the executable's working directory along with the target dll itself. The debugger simply doesn't load the symbols for the dll, and the dll doesn't show in the Modules list.
None of the solutions I've found online work for this problem. The dll doesn't show in the modules list available from 'Debug-Windows-Modules' menu selection... even though it is, in fact, loaded. Breakpoints set in the wrapper class work correctly.
Deleting the bin and obj directories, cleaning and rebuilding the solution also doesn't help.