I recommend using Mono Soft Debugger. It was included in Mono runtime with Mono 2.6 and is more reliable than the old hard debugger, and also much more portable.
You can start the Mono soft debugger by passing parameters using the --debugger-agent command line --debugger-agent to the Mono runtime. This can be done from the deployment node by building a fake set of command line arguments and passing it to mono_jit_parse_options . For example, the Moonlight browser plugin uses debug agent values ββfrom the MOON_SOFT_DEBUG environment variable, if installed.
Typically, debugger options are similar to
--debugger-agent="transport=dt_socket,address=$ADDRESS:$PORT"
which will cause the application to try to connect to the debugger listening on this address and pause until the connection is established. Please note that the connection is established via TCP / IP, which means that remote debugging is very easy to configure, and even on the local computer you will use localhost. Additional options are described on the Mano man page.
Another piece you need is the debugger's GUI / controller, listening for a connection from your application, and handling stepping / rendering, etc. I would suggest using MonoDevelop. There is a library for the wired debugger protocol Mono.Debugger.Soft.dll, but it is rather low-level, and although Mono Tools for Visual Studio supports connecting to a soft debugger, it is not yet extensible, which allows you to debug Mono host embedding.
Using MonoDevelop to receive debugging connections from host embeddings currently requires the creation of addin, but it's pretty simple. Take a look at monodevelop-list is a good resource if you have additional questions.
source share