A VisualStudio Mono soft debugger extension.
Open "Tools" then "Mono SDB Settings" and set the "Mono path" to a Mono installation directory.
Set the project you want to debug as the Startup project.
Open "Tools" then select:
- Debug localhost: To connect to localhost:[default port].
- Debug remote: To connect to a remote debug host.
Note: The MDB file will be automatically built before the debugger attaches.
-
Command line usage:
mono --soft-breakpoints --debugger-agent=transport=dt_socket,address=127.0.01:9000,server=y [other arguments]
-
Embedded mono:
Enabling debug mode:
const char* options[] = { "--soft-breakpoints", "--debugger-agent=transport=dt_socket,address=192.168.0.8:9000,server=y" }; mono_jit_parse_options(2, (char**)options); mono_debug_init(MONO_DEBUG_FORMAT_MONO);
Before loading an assembly load the MDB using the following method:
mono_debug_open_image_from_memory(MonoImage* targetImage, mono_byte* MDBData, int MDBDataLength);
For example:
MonoImageOpenStatus status = MONO_IMAGE_ERROR_ERRNO; MonoImage* imagePtr = mono_image_open_from_data_with_name(...); mono_debug_open_image_from_memory(...); status = MONO_IMAGE_ERROR_ERRNO; MonoAssembly* assemblyPtr = mono_assembly_load_from_full(...);