> Thanks for your quick reply to my posting.
> 1. I am using VS2005.
> 2. Debugger type is set to Auto - I will change this to mixed.
> 3. "Did you turn off the edit-and-continue option but continue to generate
> the PDB file?" I don't know the answer to this question...I am new to
> managed
> code.
William,
At this point I have gotten thoroughly mixed up. Let me review:
I have two projects, one dependent on the other:
1. The first project is my Visual C++ program. I am compiling this project
as unmanaged, native, except for two modules. In the project properties, I
have set "No common Language Runtime support", Debug Information Format =
"Program Database for Edit & Continue (/ZI)", and Debugger Type = mixed.
There are two files in this project that I am compiling with /clr. For
these, I have set Debug Information Format = disabled. One of these files
uses a dialog class defined in the 2nd project.
2. The second project was created from the example in the MSDN Library
entitled "Hosting a Windows Form User Control in an MFC Dialog box". This is
a Visual C# Windows control library project. It creates a a Windows Form User
control that will be hosted in the MFC dialog box.
For this 2nd project, I have set Debugger type = Mixed, Debug Information
Format to Program database (/Zi), and Common Language Runtime support to
"Pure MSIL Common Languare runtime support (/clr:pure).
Are these settings correct?
Thanks,
Jim
> > Thanks for your quick reply to my posting.
>
[quoted text clipped - 23 lines]
> Will
> www.ivrforbeginners.com
William DePalo [MVP VC++] - 07 Mar 2007 22:39 GMT
> At this point I have gotten thoroughly mixed up. Let me review:
>
[quoted text clipped - 4 lines]
> have set "No common Language Runtime support", Debug Information Format =
> "Program Database for Edit & Continue (/ZI)", and Debugger Type = mixed.
I thought you started this thread by saying you needed to disable edit and
continue. To be honest, I can't tell you whether it is strictly necessary in
your case because I _always_ turn the option off. I always turn off
incremental linking as well.
> There are two files in this project that I am compiling with /clr. For
> these, I have set Debug Information Format = disabled. One of these files
> uses a dialog class defined in the 2nd project.
I can't see how you'll be able to debug at the source code level if you turn
off debug information. Is the problem that you are unable to debug the
module for which you disabled debug information?
Regards,
Will
www.ivrforbeginners.com
Jim Walsh - 07 Mar 2007 22:56 GMT
Will,
I actually have the debugging part of this working.
Working with mixed assemblies really is tricky. But, I have finally figured
out a consistent set of switches that enable me to get debugging information.
The project settings that I have come up with are:
Debugger Type - Mixed
Debug Information Format: Program Database (/Zi)
Runtime Library: Multi-threaded Debug DLL (/MDd)
Precompiled Headers: Not using Precompiled Headers
Enable Minimal Rebuild: No
Enable C++ Exceptions: Yes with SEH Exceptions (/EHa)
This now compiles, and I can set breakpoints in both the unmanaged and
managed code, and trace from the unmanaged into the managed code.
New problem (actually an old problem) I have posted separately. The program
seems to run fine, but when I exit, I get an error in DomainUnload, when it
calls the function UninitializeAppDomain(). I have no idea what is going on
there.
Thanks again for your advice.
Jim
> > At this point I have gotten thoroughly mixed up. Let me review:
> >
[quoted text clipped - 21 lines]
> Will
> www.ivrforbeginners.com
William DePalo [MVP VC++] - 07 Mar 2007 23:31 GMT
> This now compiles, and I can set breakpoints in both the unmanaged and
> managed code, and trace from the unmanaged into the managed code.
Congratulations.
> New problem (actually an old problem) I have posted separately. The
> program
[quoted text clipped - 3 lines]
> on
> there.
I can't say that anything rings a bell. Sorry.
Regards,
Will