[MonoDevelop] remote debugging a hello world application
ian.norton-badrul at thales-esecurity.com
Fri Apr 27 06:33:54 UTC 2012
Jerrill <jerrill at gmail.com> wrote:
>I'm ultimately going to try and remote debug an application on an
>Linux device, but I though I would try out the process locally first
>have run into a problem.
>I have the following application (debug-test.cs):
> class MainClass
> public static void Main (string args)
> Console.WriteLine ("Hello World once!"); //breakpoint here!
> Console.WriteLine ("Hello World twice!");
> Console.WriteLine ("Hello World three times!");
>I launch MonoDevelop 2.6 on Ubuntu 11.10 with the environment variable
>MONODEVELOP_SDB_TEST set to 1. This gives me the Run->Run With->Custom
>Command Mono Soft Debugger option. I start the debugger listening on
>127.0.0.1:10000 and get the "Waiting for debugger to connect..."
>From the command line I execute the following:
>And nothing happens.... The "Waiting for debugger to connect..." window
>never goes away. I can confirm that a connection is made as follows:
># netstat -n inet
>Active Internet connections (w/o servers)
>Proto Recv-Q Send-Q Local Address Foreign Address
>tcp 13 0 127.0.0.1:10000 127.0.0.1:44421
>And when I click the Cancel button, only then does the command prompt
>reappear after the following message:
>debugger-agent: DWP handshake failed.
>If I run the debugger without the listener running I get the following:
>debugger-agent: Unable to connect to 127.0.0.1:10000
>So *something* is happening, but it doesn't appear to be a debugging
>If I debug with Run->Run With->Mono Soft Debugger I can successfully
>When I inspect how this is all invoked I get the following:
>USER PID %CPU %MEM VSZ RSS TTY STAT START TIME
>jerrill 8159 0.1 0.6 65712 13752 pts/1 Sl+ 01:03 0:00
>/usr/bin/gnome-terminal --disable-factory --title MonoDevelop External
>Console -e bash -c 'cd
>; echo; read -p "Press any key to continue..." -n1;'
>jerrill 8163 0.0 0.0 2212 720 pts/1 S+ 01:03 0:00
>jerrill 8164 0.0 0.0 5396 1128 pts/3 Ss+ 01:03 0:00 bash
>; echo; read -p "Press any key to continue..." -n1;
>jerrill 8165 0.0 0.1 13924 3880 pts/3 Sl+ 01:03 0:00
>I can see that my assembly is being invoked nearly the same way, except
>using the hidden addin in the failing case.
>Can anyone shed some light on what I'm doing wrong?
>Thank you in advance for your help!
>View this message in context:
>Sent from the Mono - MonoDevelop IDE mailing list archive at
>Monodevelop-list mailing list
>Monodevelop-list at lists.ximian.com
You are doing all the right things, I could only get this working with mono 2.10.8 and monodevelop 2.8.x as built from sources, checkout my pmono ubuntu packages. I use them at work and often do remote debug.
More information about the Monodevelop-list