views:

25

answers:

1

I have a solution with an unmanaged c++ dll project in it and a c# managed project that calls dll using PInvoke. Is it possible to debug both managed and unmanaged code so that I see what is going on "inside" of that dll?

+1  A: 

Yup. If I'm not mistaken, it should do this automatically, as long as the profile is set to "Debug".

Edit: Oh, I forgot one thing: In the debugging options for the managed project, make sure you have the option "Enable unmanaged code debugging". Then it should step into the unmanaged code.

Mike Caron
mmm well the breakpoints in c++ project are inactive as if symbols were not loaded.However, managed application can be debugged correctly. Do you know what is a pattern for mixed managed/unmanaged solutions in terms of project references (dll copy) and debugging?
adrin
As I just discovered, you have to set the "Enable unmanaged code debugging" option in the debugging section of the managed project's properties, and it will let you debug unmanaged code!
Mike Caron
It works! thanks for the hint!
adrin