Debugging in managed / unmanaged dlls doesn't work in VS 2005. Why?
I want to debug a piece of code written in C ++. The problem is the dlls are mixed - it contains both C ++ and CLI (managed C ++). Environment - VS 2005.
My entry point is a very simple executable project written in C ++ that only runs code in a mixed dll.
The problem is that:
-
if I allow "Debug Type" as "Auto" for both projects my breakpoints are not hit. (edit later: this is ok as Auto is based on the contents of the executable project).
-
if I set it to "mixed" the breakpoints are removed but the unmanaged clock is empty. For example, I can't see the value of std :: string. However, I can see basic types like int and bool.
source to share
I can debug in Mixed Mode in VS2005 by setting the Debugger Type to Mix in the project properties (under the Debug tab). Sometimes things like this go away after a good reboot and clean recovery.
If that doesn't work, try connecting to the app after it starts (Debug | Attach to Process). You can select a debug mode by clicking the "Select" button in the middle next to the "Attach to:" section.
Do you have all the updates from Microsoft? There might be one that solves your problem.
Overall, mixed mode debugging seems to work much better in VS2008. I recommend updating if possible. There is a free version, but I think it is limited in some way.
source to share