Forum Visual Studio

Cannot execute in debug mode - any IOS Project (even hello world)

CodeInPeace2CodeInPeace2 USMember
edited March 2013 in Visual Studio

I cannot seem to be able to execute any IOS project in Debug mode- even the most basic hello world. It compiles and then just just says Cannot execute "/Users/....." It executes fine in Release mode.

Any idea? I have just purchased a student license today and have the latest version.


  • thomas.tronhusthomas.tronhus USMember

    i am experiencing the same behavior, tried to downgrade my ios to version still the same error. I Then downgraded to Version: and now my debugger works again first time i run my solution. but the et breaks again. If then reset my iphonesimulator i can debug again.

  • CodeInPeace2CodeInPeace2 USMember

    Does anybody have a proper solution for this? Not being able debug IOS projects renders the entire Xamarin product useless

  • AndrewHoneAndrewHone AUMember

    I'm having the same problem

  • thomas.tronhusthomas.tronhus USMember

    I have fixed it by setting the output path on the project, Under the "All Configuration" settings.

  • AndrewHoneAndrewHone AUMember

    I tried it but it didn't help me

  • AndrewHoneAndrewHone AUMember

    I got it working again, by completely removing both XCode and Xamarin studio from my system, and reinstalling both.

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai
    edited March 2013

    If you open ~/Library/Preferences/XamarinStudio-4.0/MonoDevelopProperties.xml, look for the MonoTouch settings:

    <Property key="MonoTouch.Debugger.UsbDebugging" value="True" /> <Property key="MonoTouch.Debugger.Port" value="10000" /> <Property key="MonoTouch.Debugger.UsePermanentConnection" value="True" />

    Are your settings the same?

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    I've committed a fix to Xamarin Studio to have the system assign us a port to use for debugging instead of trying to always use port 10000.

    It would be interesting if someone who can reliably reproduce this issue could run lsof -i | grep LISTEN and find out what is listening on port 10000 when this error occurs.

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    As a workaround, do things work if you set the MonoTouch.Debugger.Port value to 0? (that's effectively what my fix does)

  • CodeInPeace2CodeInPeace2 USMember

    Thanks Jeffrey, the workaround (setting the port to 0) has finally fixed this issue for me.

  • I have the same issue, but the file '~/Library/Preferences/XamarinStudio-4.0/MonoDevelopProperties.xml'
    does not contain any 'monotouch.' keys.

    I installed xamarin studio today, and checked IOS and Android.

    I already had xcode on my machine (I develop IOS apps)

    any ideas?

  • AbooAboo USMember

    Same issue here. If I leave the computer for some time then I can run once but after that the same error. I believe a port will remain in use. The funny thing is that I am developing for past two days with no issues on the same project and it suddenly appeared and will not go away.
    The first time I closed Xamarin Studio and re-opened it and could run the project for a few times but now it's not working at all.

  • AbooAboo USMember

    I've run lsof -i | grep LISTEN and nothing is listening to port 10000 and the only Xamarain related record is as below:

    XamarinSt 3270 aboo 16u IPv4 0x484ba8741afa323 0t0 TCP localhost:ndmp (LISTEN)

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    ndmp is port 10000

  • AbooAboo USMember

    Now I am confused!!!
    Why my project (MTDExperiment) is trying to connect to utorrent when I run it. BTW, it's working fine now.

  • matcheymatchey USMember, Beta ✭✭

    Same problem here. I've tried to change the port setting in the xml file, but it is recreated with default value of 10000 each time I start XamarinStudio.
    Nothing is listening on that port.

  • BenjaminNovoselskyBenjaminNovoselsky CAMember, Beta

    I have fixed the same issue on my machine by quitting mTorrent that has been running.

  • ScottColestockScottColestock USMember, Beta
    edited March 2013

    Setting MonoTouch.Debugger.Port to zero worked for me - thanks.

  • moljacmoljac HRBeta ✭✭✭


    I had the same behaviour, each restart port 10000 recreated

    • try setting port to 0 and
    • remove ~/Library/Preferences/XamarinStudio-4.0/MonoDevelopProperties.xml.previous

    this worked for me. Working for 3-4 hours with 10+ reopening XS on several solutions and no

  • matcheymatchey USMember, Beta ✭✭


    Worked that way. Thanks!

  • NamHoang.3859NamHoang.3859 CAMember ✭✭
    edited April 2013

    I had the same issue and I figured out that at that moment uTorrent was running on port 10000 (ndmp). Quitting uTorrent solved the issue.

    However, I could not change the MonoTouch.Debugger.Port to "0". When I did it, Xamarin still listened on ndmp. Then I restarted Xamarin Studio, the port changed back to 10000. I had deleted the .xml.previous as well.

    Does anybody has other solution?

    I find out that I should run debugger first then start uTorrent. uTorrent will not listen on 10000 anymore.

  • AbooAboo USMember

    It was same for me as well. What I did was to restart my machine then edited the XML file and changed the port to 0 before running Xamarin studio. That fixed my issue for good.

  • EternalBardEternalBard BRBeta ✭✭

    Fantastic! I closed uTorrent and Xamarin Studio, reopen the project, begin a debug, restarted uTorrent. Two things running again, Xamarin Studio debuging and uTorrent downloads. Thanks!

  • huyluhuylu USMember

    Thanks EternalBard, I do the same with you. It works fine to me.

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    QA is currently banging on the upcoming 4.0.5 release which contains a fix for this issue and will hopefully be released to the public next week.

    Once you upgrade to 4.0.5, you'll likely want to change the port value back to 10000.

  • Hi , I am using release of Xamarin studio with OS X ( 10.8.3) - I have been using it for last couple of days - suddenly today i get the error "MonoTouch: Socket error while connecting to MonoDevelop on Connection refused"

    Nothing is listening on port 10000
    I do not see ~/Library/Preferences/Xamarin ...folder, where do I change these settings ?

    I am using iPhone Simulator 6.1 for debugging.

  • I am able to debug ..though still i can see teh above line in "application output"

  • RolfBjarneKvingeRolfBjarneKvinge USXamarin Team Xamurai

    @harithaReddy: the ~/Library folder is by default hidden in Finder, you can find it by clicking alt+Go menu (or use Terminal instead).

    edited August 2015

    I could run the application fine. all the way But one day I am facing this error. I tried the work around mentioned here, but I could the following setting itself in the xml file.

    <Property key="MonoTouch.Debugger.Port" value="10000" /> <Property key="MonoTouch.Debugger.UsePermanentConnection" value="True" />
    I am using Xamarin Studio 5.9.5. Any idea ?What the problem could be.....

  • AdnanKhanAdnanKhan USMember ✭✭

    For me i have to disable the option: debugging & instrumentation can be found under "IOS Debug".
    Next ran the application with the IOS IPhone simulator.
    Stop the application enable the option : debugging & instrumentation again.
    Next ran the application again and worked fine.
    I am also using PCL4.5 - Profile78

Sign In or Register to comment.