Today, I finally finished the massive refactoring of our debugging engine that's used in Mono Tools and Mono for Android.
The biggest news is that this new engine is now using the unmodified, original debugging libraries from MonoDevelop and the managed pdb2mdb from Cecil.
As mentioned in an earlier post, Mono Tools was previously using a locally forked copy of these libraries with plenty of local changes. Cleaning these up was a huge and complicated process, and I'd especially like to thank Michael Hutchinson and Lluis Sanchez for their great help.
This was not only about getting a few patches into the upstream version, Michael and Lluis also showed me alternative, better ways of doing certain things, helped me eliminate local hacks and replace them with good and clean solutions.
As a result, I was also able to cleanup and redesign my code in the debugging engine a lot.
In the current version, we only use the public Mono.Debugging.Client APIs in Mono Tools and Mono for Android (with the only exception of Mono.Debugging.Soft.SoftDebuggerStartInfo). The Mono.Debugging.Client.DebuggerSession is now also responsible for creating the connection to SDB - by using either launch, connect or listen mode, depending on the Mono.Debugging.Soft.SoftDebuggerStartArgs that you use.
I also turned things upside-down by making the debugger session create the debugger engine (these COM objects that are used to communicate with Visual Studio) and not the other way around. This has the great benefit that we can re-use MonoDevelop connection and error handling code.
With my new build system, it's also very easy to pull a new version from MonoDevelop and integrate it in Mono Tools / Mono for Android, it's just a matter of checking out MonoDevelop, running some script to .zip up all the required sources, unzip and build them in Visual Studio and done. In theory, it's also possible to build on Linux, building in Visual Studio just makes it a lot easier to debug things.
There are still a few tiny issues that need to be figured out, but these shouldn't take too long.
My next step is doing a bug-fixing week or two, to finally process and fix this long list of outstanding bugs.