I am trying to debug a project with a C# assembly and a C++/Cli assembly.
An interface defined in C# is inherited by a C++/Cli class, which in turn calls a native C++ class. Mixed-mode debugging is enabled in both C++ and C# assembly, as well as the startup .exe.
Now, when I try to debug into the C++ part, it gets tricky; if I simply set breakpoints in the C++ part, they are not hit (despite the fact that I know that they are hit because logs (etc) are written and throwing an exception there actually will throw it properly).
When I set a breakpoint at the latest call in C# before the call to the mixed-mode assembly, I can step into the C++/Cli code, and even into the native part. However, the Call stack is shown as
MyMixedMode.dll!<Unknown function> Line ...
and I cannot inspect any locals (the locals view is just empty while inside the native code).
Any ideas what I might be doing wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…