tags:

views:

430

answers:

2

I have an issue where the MonoDevelop debugger refuses to connect to the simulator. MonoDevelop pops a box saying "Waiting for debugger to connect on 127.0.0.1:10000..." but never connects.

I have uninstalled and reinstalled everything, but still have the same issue.

What am I missing?

Thanks in advance.

+2  A: 

Try the following:

  1. In the simulator, go to the Settings "app"
  2. Find your app's name in the list below General/Safari/Photos
  3. Tap it to bring up its settings
  4. You should be looking at your app's "Debug Settings"
  5. Is "Enabled" (the first item) set to "On" or "Off"?

That's the first thing to look at. If your app's debug "Enabled" setting is "Off" when you try to debug your app, your app will load in the simulator, and MonoDevelop will say it's trying to connect (because it is), but it won't be able to, so... well, you'll get the results you're describing.

If you go through the steps in that list and encounter any problems (like your app not showing up in the simulator's "Settings" list, or it not having "Debug Settings", or it still not working despite having switched "Enabled" to "On"), then you can try a few other things (in no particular order - just typing what comes to mind):

  • Create a new project from scratch. Does the same thing happen? That is, does this problem exist for all your apps?

  • In MonoDevelop, open your app's project settings, click on "iPhone Build", and, with the configuration set to "Debug" and the platform set to "iPhone Simulator", ensure that "Build debug-mode binaries" is checked.

  • In MonoDevelop, open the "Build" menu, select "Clean All", rebuild your project, and try again.

  • If your app is properly configured, and if its settings on the simulator are correct, then try debugging your app - if MonoDevelop still sits and tries to connect without success, open up a terminal window (while your app is still running) and type "netstat -n -f inet" - do you see "127.0.0.1:10000" anywhere in the list under the "Local Address" column? If not, then something's probably wonky on the simulator.

  • If nothing seems to be working, and if you've already reinstalled the MonoTouch stack (as it seems you have), you can try opening the iPhone simulator, open the "iPhone Simulator" menu, and click on "Reset Content and Settings..." - it can be an inconvenience, but if you're running out of options, you might as well give it a shot.

Without knowing more about your setup or having access to log files, it's tough to figure out what's going on, but those are a few things I think are worth trying.

Hope this helps - at least to point you in a useful direction :)

Rory Blyth
A: 

I have the same problem. MonoTouch is unable to connect to the simulator with my existing solution. However, if I create a new application, MonoTouch works fine.

Some Elf