Cannot debug from unmanged code into managed code

B

B.

my small project has two files, umg.cpp (unmanaged c++) and mged.cpp
(MC++), and unmanged code will call managed code. However, I cannot
debug from unmanged code into managed code. Can anyone help me to solve
the problem?
 
C

Carl Daniel [VC++ MVP]

B. said:
my small project has two files, umg.cpp (unmanaged c++) and mged.cpp
(MC++), and unmanged code will call managed code. However, I cannot
debug from unmanged code into managed code. Can anyone help me to solve
the problem?

From the VC++ menu:

Project -> Properties -> Configutation Properties -> Debugging -> Debugger
Type

Change from whatever it is to "Mixed"

-cd
 
C

Carl Daniel [VC++ MVP]

B. said:
Hi Carl,

I already tried that, but it didn't work for me.

OK, let's get some more details then.

What kind of project is this (Console program, Windows program, DLL, etc)?

Is the entry point managed or unmanaged?

Are you debugging a release build?

Have you tried (or is this) the simplest possible implementation that might
illustrate the problem you're encountering?

-cd
 
B

B.

Guess I solved it. I have a win32 exe calling this project (DLL), and I
have set the win32 exe's build type to be mixed as well.

Thanks a lot,
 
C

Carl Daniel [VC++ MVP]

B. said:
Guess I solved it. I have a win32 exe calling this project (DLL), and I
have set the win32 exe's build type to be mixed as well.

I assume you mean that you set the debugger type - you didn't need to change
anything in the build settings per-se.

The debugger settings for the project that launches the debugger (the EXE)
determine how the debugger will behave. As you discovered, the fact that
the EXE loads a DLL that has the debugger type set to Mixed has no effect.

Glad you got it working.

-cd
 

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