[Mono-dev] debug embedded mono

Michael Hutchinson m.j.hutchinson at gmail.com
Wed Aug 25 16:59:19 EDT 2010

On Fri, Aug 6, 2010 at 9:54 AM, marcus julius <marcusjls at yahoo.com> wrote:
> I have a C++ application that uses C sharp classes which also use C++ functions. Thus, both C++ and C sharp call each other, but main project that I run is C++. The question is how to debug this project?
> I tried to create a dummy start up C sharp project and call my C sharp code from there. The mono debugger works for the C sharp code, but it does not find the C++ functions that are called from within C sharp. MethodNotImplemented exception is thrown.
> The mono debugger does not work on C++ and regular debugger cannot access to the Mono code in C sharp.
> So, any information on how to do it?

It's not possible to do "mixed-mode" debugging with Mono, i.e debug C#
and C++ simultaneously. However, you can debug C# code within an
embedding host. To do so, the host must initialize the Mono Soft
Debugger. This causes the debugger in the Mono runtime to make a TCP
connection to an IDE. You can create a simple addin in MonoDevelop to
cause it to listen for a debuggee and start a debugging session.

For some examples, check the mono-osx list archives.

Michael Hutchinson

More information about the Mono-devel-list mailing list