Debug into unmanaged C++ code from managed dll

G

Guest

I was wondering if it is possible and how to debug from managedC++ dll into
unmanaged C++ code. I tried, but without any success.
What I try to do is to wrap a unmanaged C++ dll using a Managed C++ wrapper
class so that managed code can access my unmanaged code.
Thanks.

Michael
 
C

Carl Daniel [VC++ MVP]

Michael said:
I was wondering if it is possible and how to debug from managedC++
dll into unmanaged C++ code. I tried, but without any success.
What I try to do is to wrap a unmanaged C++ dll using a Managed C++
wrapper class so that managed code can access my unmanaged code.

It's possible, but not recommended. There's an option in project properties
under Configuration Properties|Debugging: Enable unmanaged debugging.

I don't recommend it expect when you've tried everything else because
mixed-mode debugging is very very (very) slow. Be sure to turn the option
off when you're done.

-cd
 
G

Guest

Hi, Carl,
Thanks for the quick response. I am using Managed C++ extensions to wrap
the native C++ dll. I could not find the Enable unmanaged debugging property
in project properties. The property is available if the project is C#.
Is there anything else I could do?


Michael
 
C

Carl Daniel [VC++ MVP]

Michael said:
Hi, Carl,
Thanks for the quick response. I am using Managed C++ extensions to
wrap the native C++ dll. I could not find the Enable unmanaged
debugging property in project properties. The property is available
if the project is C#. Is there anything else I could do?

I'm 99.99% sure it's there somewhere for C++ too - look around for it.

I believe that if you attach to the process instead of starting it under the
debugger than you can simply check both CLR and Native boxes in the window
that appears.

-cd
 
W

William DePalo [MVP VC++]

Michael said:
Thanks for the quick response. I am using Managed C++ extensions to wrap
the native C++ dll. I could not find the Enable unmanaged debugging
property
in project properties. The property is available if the project is C#.
Is there anything else I could do?

Are you using VS.Net 2003?

If so, from the menu,

for C++ projects,

Project->Properties->Debugging->Debugger Type

for C# projects

Project->Properties->Debugging->Enable Unmanaged Debugging

Regards,
Will
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top