debugging - "skipped loading symbols for ngen binary" for C# dll -
i'm trying debug c# dll native c++ executable. have c# com object loaded , run native code via idispatch. built in debug, both c# , c++ code. whilst can see c++ code, , c++ dlls have symbols loaded , available debugging, breakpoints etc c# code refuses play.
what see c# dlls refuse load symbol pdbs, reporting "skipped loading symbols ngen binary" in modules window.
incidentally, debugging c# solution here, have set native executable 'start external program' in com project's debug settings.
now can start c++ executable , attach it, , works expect - symbols load , can set breakpoints in c#.
this using visual studio 2013u4. there setting enable mixed-mode debugging? 1 niggle native code built vs2010.
here's module window - note pdbs , dlls in single directory, can see c++ dlls loaded, not c# ones.
here's modules window - note 3rd entry evcom dll (the com object) assume entry enabling debugging.
there nothing of interest in output window, when comes load com dll, see following (in case of attach running process, other has 2 loaded lines instead of 3).
'explorer.exe' (win32): loaded 'c:\dev\...\lib\debug\evcom.dll'. 'explorer.exe' (win32): loaded 'c:\dev\...\lib\debug\evcom.dll'. 'explorer.exe' (win32): unloaded 'c:\...\lib\debug\evcom.dll' 'explorer.exe' (win32): loaded 'c:\dev\...\lib\debug\evcom.dll'.
one thing of interest - checked "use managed compatibility mode" in debug settings and, thought still doesn't load symbols when starting debugging, shows 1 entry in modules list. time saying "no native symbols in symbol file" c# dlls.
it looks problem not being able select debugger type in vs2013 (or 2012). this connect article suggests "by design" workarounds.
turns out down changes in debug engine .net 4.0
.net 4 , greater uses different debug engine .net 3.5 , below, when start debugging native application debugger choose .net debugger (defaults .net 4.0) , if .net dll built using platform, - breakpoints hit.
if loaded dll .net 3.5, debug engine not understand dlls loaded , refuse load symbols or debug.
the solutions either rebuild .net 4, or start native executable , attach (where can select debugger type, either 'old' .net or 'new' .net) or can create project executable , set debug settings specify right debugger.
what find annoying microsoft have started debugger using .net framework type specified in project you're debugging (after all, when debugging dll , specifying external program, still want debug dll you're pressing f5 for, know debugger use!)(what even more annoying once managed debugging started in loaded dll, can step projects built using older .net frameworks without problem).
more details on this microsoft connect article
Comments
Post a Comment