Question

I am trying to debug a dynamic library I have wrote used by an application inside Visual Studio 2010. I can step into until a function of my dll, but I can't step into deeper and see the source code. If I open the Disassembly window, then I can step into the ASM code but I don't see the source code or any symbol.

I have build a .dll and an import .lib. The .pdb (/Zi) file associated to the dll has been built too (with /DEBUG). Optimisation are disabled (/Od).

My application links the import lib with a #pragma comment(lib, "myImport.lib") because the application has a build tool I can't configure myself.

My application is run in debug, and in the Modules of the debugger I can see my dll is loaded as well as the symbols.

I have also check the Options > Debugging > General Enable Just My Code option is disable.

How to force VS2010 to step into the functions of my dll?

Was it helpful?

Solution 2

As you could expect it was a compile incompatibility. The dll was compiled for CLR runtime (/clr). I guess because a default configuration of VS2010. Since I removed this option everything can be debug as usual.

OTHER TIPS

We have a slightly different setup where we launch another application we don't have the source code from which, in turn, loads a dll built by ourselves. To debug into it we use the Visual Studio command Debug / Attach to Process... Maybe this command could lead you to a successful debugging into your dll's sources.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top