Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't use Mono Soft Debugger Remote Debugging because 'debugger-agent: DWP handshake failed' error
    primarykey
    data
    text
    <p>I've embedded mono in my application. The application is console application that supports plug-ins. Plug-ins are .NET assemblies. All work great, but i want to debug them. To enable debugging in my C-code i have:</p> <pre><code>mono_set_dirs (ASSEMBLIES_DIR_NAME, ASSEMBLIES_DIR_NAME); assembly_add_to_bundle(API_ASSEMBLY); soft_debug = getenv("MYAPP_SOFT_DEBUG"); if (soft_debug != NULL) { char *options; options = malloc(17 + strlen(soft_debug)); sprintf(options, "--debugger-agent=%s", soft_debug); mono_jit_parse_options (1, &amp;options); free (options); mono_debug_init (MONO_DEBUG_FORMAT_MONO); } domain = JIT_INIT(); ... </code></pre> <p>The code above inits mono runtime and it's all i've done to enable debugging. To enable debugging at MonoDevelop side i've created an Add-in and implemented necessary classes. The one that starts debugging is derived from RemoteSoftDebuggerSession. Here is my OnRun method:</p> <pre><code>protected override void OnRun (DebuggerStartInfo startInfo) { var dsi = (MyAppDebuggerStartInfo) startInfo; var procStartInfo = new ProcessStartInfo(@"C:\MyApp\myapp.exe") { UseShellExecute = false, RedirectStandardOutput = true, RedirectStandardError = true, WorkingDirectory = @"C:\MyApp", Arguments = dsi.AppName }; procStartInfo.EnvironmentVariables.Add("MYAPP_SOFT_DEBUG", String.Format("transport=dt_socket,address={0}:{1}", dsi.Address, dsi.DebugPort)); this._myapp = Process.Start(procStartInfo); this._runner.EnableRaisingEvents = true; base.ConnectOutput(this._runner.StandardOutput, false); base.ConnectOutput(this._runner.StandardError, true); this._runner.Exited += delegate { this.EndSession(); }; base.StartListening(dsi); } </code></pre> <p>The problem is when i start debugging myapp prints "debugger-agent: DWP handshake failed" and debugging ends. All i could figure out is that exactly 13 bytes are sent to myapp.exe and 13 bytes are recieved (the number of chars in "DWP-Handshake").</p> <p>Anybady know smth about this issue?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload