"The breakpoint will not currently be hit" error while debugging a mixed mode application (c# and unmanaged c++)

Posted by user1678403 on Stack Overflow See other posts from Stack Overflow or by user1678403
Published on 2012-09-17T18:56:00Z Indexed on 2012/09/18 3:38 UTC
Read the original article Hit count: 96

Filed under:
|
|
|
|

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.

© Stack Overflow or respective owner

Related posts about c#

Related posts about c++