shadeMe
shadeMe

Reputation: 716

Unreachable breakpoint at execut(able/ing) code

I've got two DLLs, one in written in native C++ and the other in C++/CLI. The former is injected into a process, and at a later point in time, loads the latter. While debugging, I noticed that the native DLL's breakpoints were functioning correctly while the other's weren't, even though its code was being executed.

The breakpoints showed this message: This breakpoint will not be hit. No executable code associated with this line. Possible causes include: preprocessor directives or compiler/linker optimizations.

The modules window tells me that the plugin's symbols are loaded. I'm running with its DEBUG build. Any ideas on why this is so and perhaps a fix ?

Upvotes: 2

Views: 3746

Answers (2)

Sameh Deabes
Sameh Deabes

Reputation: 2973

The reason for what you faced is that the PDBs ("PDB stands for Program Database, a proprietary file format (developed by Microsoft) for storing debugging information about a program) are not up-to-date.

Try to clean the solution (that contains the managed code DLL) and rebuild it again.

Tip: if you are referring to the DLL, try to put the up-to-date pdbs beside the it. You can get the pdbs from your bin folder.

Upvotes: 1

Stu Mackellar
Stu Mackellar

Reputation: 11638

I assume you're using Visual Studio. Do you have mixed-mode debugging switched on?

(Project Properties->Debugging->Debugger Type)

Upvotes: 1

Related Questions