I'm using Embedded Mono, its working great. The main app is C++ and I'm able to load assemblies, construct objects, call methods, etc.
What I want to do now, is be able to use MonoDevelop to connect to my program, then be able to set breakpoints in the Managed(C#) code. After much research, I am passing the following to:
static const char* options[] = {
"--soft-breakpoints",
"--debugger-agent=transport=dt_socket,address=127.0.0.1:10000"
};
mono_jit_parse_options(sizeof(options)/sizeof(char*), (char**)options);
mono_debug_init(MONO_DEBUG_FORMAT_MONO);
After making the above calls, the app will connect to MonoDevelop.
On the MonoDevelop side, I set the env. var MONODEVELOP_SDB_TEST=y which allows you to
use the "Run -> Run With -> Custom Command MonoSoft Debugger and it will connect to the
app.
Here is the tricky part: In order to have the Run With -> Custom Command MonoSoft Debugger choice you neeed to have a project opened, to do this, I simply opened the (Debug built) assembly, then, in the Project Options I added a custom "Execute" command and pointed to the C++ .exe, and checked "Run on external Console".
After clicking "Listen" in the MonoSoft Debugger dialog, my app starts up, I see messages in the Application Output about my assemblies, however, If I open up the source file (C#) and try to set a breakpoint, the turn the disabled color and never get hit. What am I missing, do I need to call some other mono_debug function to inform mono to debug my assemblies, is there some sort of gdb-like path property to tell MonoDevelop where to look for sources?