views:

34

answers:

1

Hello, I am working with mixed mode assemblies in C++/CLI. All managed mode assemblies pdb's get loaded when successfully in mixed mode assembly. But native dll's pdb's not getting loaded even no information shown of native pdb in Modules pane (i.e in VS Debug->Windows->Modules).

Note: I am using native dll and calling its exported function in mixed assembly in C++/CLI code.Here functions get called successfully , but native pdb symbols not loading and all breakpoints in native code are shown as hollow circle and tool tip says : No symbols loaded for this...

I have done everything, pdb placed in current directory from where managed process launched. Deleted all obj and debug folders and recompiled every project at the same time. even used ChkMatch utility which shown that symbols in Exe and corresponding pdb matched.

Any way around to enable breakpoints of native code while calling from managed(C++/LCI Mixed mode)code.

Regards Usman

+1  A: 

Mixed-mode debugging can be hit and miss, mostly miss. First check that you've actually have mixed-mode debugging enabled. From a C# project, it is Project + Properties, Debug, Enabled unmanaged code debugging check box. Next, mixed-mode debugging is not enabled for 64-bit processes. If you run on a 64-bit operating system, make sure you force the .exe to run in 32-bit mode. Project + Properties, Build tab, Platform Target = x86.

Next verify where the debugger looked for the .pdb files. From the Debug + Windows + Modules window, right-click the DLL and select "Symbol load information". Final gasp is to use __debugbreak() in the unmanaged code.

Hans Passant