How to Debug C# code from VC++
Hi,
I have COM EXE Component written in C#, another dll Component written in VC++, through smart Pointer(by generating tlb) i m calling C# API's from VC++.
My question is what options(Compiler options probably) should be specified so that when I debug from VC++ component I can stepInto C# and continue debug even there.
Thx in Advance.
Re: How to Debug C# code from VC++
Not what you are asking, but another way to debug this is from the C# perspective. In other words, you open the C# COM project, set breakpoints, etc. and then set up the start up exe (in the debug settings) to your other C++ application. Then when you start debugging, the C+ exe is launched allowing you to debug the C# code.
As far as the original question, be sure you have the 'debug managed code' debugger option checked.
Re: How to Debug C# code from VC++
Quote:
As far as the original question, be sure you have the 'debug managed code' debugger option checked.
You probably meant "Debug Unmanaged Code".
Karth, most viable solution is to open both projects (if you have) in one solution. Set break points in C# code, start debugging executable.
At times you need to make sure that DLL and EXE output is in same folder, so check for linker options. Most of the time, VS is smart enough to load the DLL and debugging contents even if DLL/EXE output is not same folder.