문제

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?

도움이 되었습니까?

해결책 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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top