Bug 2395 - Cannot debug twice in one monodevelop session
Summary: Cannot debug twice in one monodevelop session
Status: CLOSED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: Trunk
Hardware: PC Mac OS
: Highest blocker
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-12-07 12:53 UTC by Alan McGovern
Modified: 2012-01-04 09:50 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
CLOSED FIXED

Description Alan McGovern 2011-12-07 12:53:01 UTC
1) Create a monotouch app
2) Hit F5 to build, launch in simulator and debug
3) Background the app in the simulator, then double click on the iphone button to open the list of apps to kill and kill the app.
4) Go back to MD and ensure the debug session has stopped
5) Now press F5 to build/deploy/debug again.
6) 

Starting MonoDevelop
ERROR [2011-12-07 17:49:31Z]: Android SDK not found, needed by Mono for Android addin
   Loading Workbench
      Initializing Main Window
MacDir exists
Basedir=/Library/Frameworks/Mono.framework/Versions/2.10.7/lib/monodoc
ERROR [2011-12-07 17:50:24Z]: Error in debugger
Mono.Debugging.Client.DebuggerException: Could not connect to debugger ---> System.Exception: Could not listen on the port 10000 because another application is already using the same port. ---> System.Net.Sockets.SocketException: Address already in use
  at System.Net.Sockets.Socket.Bind (System.Net.EndPoint local_end) [0x0006c] in /private/tmp/monobuild/build/BUILD/mono-2.10.7/mcs/class/System/System.Net.Sockets/Socket.cs:1109 
  at MonoDevelop.IPhone.PersistentConnection..ctor (Boolean is_device) [0x0007e] in /private/tmp/source/md-addins/MonoDevelop.IPhone/MonoDevelop.IPhone/PersistentConnection.cs:73 
  --- End of inner exception stack trace ---
  at MonoDevelop.IPhone.PersistentConnection..ctor (Boolean is_device) [0x0009f] in /private/tmp/source/md-addins/MonoDevelop.IPhone/MonoDevelop.IPhone/PersistentConnection.cs:75 
  at MonoDevelop.IPhone.PersistentConnection.Create (Boolean is_device) [0x00014] in /private/tmp/source/md-addins/MonoDevelop.IPhone/MonoDevelop.IPhone/PersistentConnection.cs:371 
  at MonoDevelop.Debugger.Soft.IPhone.IPhoneDebuggerConnectionProvider.Connect (System.Object dummy) [0x00000] in /private/tmp/source/md-addins/MonoDevelop.IPhone/MonoDevelop.Debugger.Soft.IPhone/IPhoneDebuggerSession.cs:72 
  --- End of inner exception stack trace ---
  at MonoDevelop.Debugger.Soft.IPhone.IPhoneDebuggerConnectionProvider.EndConnect (IAsyncResult result, Mono.Debugger.Soft.VirtualMachine& vm, System.String& appName) [0x0004f] in /private/tmp/source/md-addins/MonoDevelop.IPhone/MonoDevelop.Debugger.Soft.IPhone/IPhoneDebuggerSession.cs:122 
  at Mono.Debugging.Soft.SoftDebuggerSession+<StartConnection>c__AnonStorey5.<>m__7 (IAsyncResult ar) [0x00000] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs:136 
ERROR [2011-12-07 17:51:11Z]: Error in debugger
Mono.Debugging.Client.DebuggerException: Could not connect to debugger ---> System.Exception: Could not listen on the port 10000 because another application is already using the same port. ---> System.Net.Sockets.SocketException: Address already in use
  at System.Net.Sockets.Socket.Bind (System.Net.EndPoint local_end) [0x0006c] in /private/tmp/monobuild/build/BUILD/mono-2.10.7/mcs/class/System/System.Net.Sockets/Socket.cs:1109 
  at MonoDevelop.IPhone.PersistentConnection..ctor (Boolean is_device) [0x0007e] in /private/tmp/source/md-addins/MonoDevelop.IPhone/MonoDevelop.IPhone/PersistentConnection.cs:73 
  --- End of inner exception stack trace ---
  at MonoDevelop.IPhone.PersistentConnection..ctor (Boolean is_device) [0x0009f] in /private/tmp/source/md-addins/MonoDevelop.IPhone/MonoDevelop.IPhone/PersistentConnection.cs:75 
  at MonoDevelop.IPhone.PersistentConnection.Create (Boolean is_device) [0x00014] in /private/tmp/source/md-addins/MonoDevelop.IPhone/MonoDevelop.IPhone/PersistentConnection.cs:371 
  at MonoDevelop.Debugger.Soft.IPhone.IPhoneDebuggerConnectionProvider.Connect (System.Object dummy) [0x00000] in /private/tmp/source/md-addins/MonoDevelop.IPhone/MonoDevelop.Debugger.Soft.IPhone/IPhoneDebuggerSession.cs:72 
  --- End of inner exception stack trace ---
  at MonoDevelop.Debugger.Soft.IPhone.IPhoneDebuggerConnectionProvider.EndConnect (IAsyncResult result, Mono.Debugger.Soft.VirtualMachine& vm, System.String& appName) [0x0004f] in /private/tmp/source/md-addins/MonoDevelop.IPhone/MonoDevelop.Debugger.Soft.IPhone/IPhoneDebuggerSession.cs:122 
  at Mono.Debugging.Soft.SoftDebuggerSession+<StartConnection>c__AnonStorey5.<>m__7 (IAsyncResult ar) [0x00000] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs:136
Comment 1 Alan McGovern 2011-12-07 12:56:39 UTC
when i say F5 i just mean 'build, deploy, launch with debugger', which is cmd-enter on mac
Comment 2 Jeffrey Stedfast 2011-12-07 15:16:54 UTC
Cc'ing Rolf
Comment 3 Rolf Bjarne Kvinge [MSFT] 2011-12-07 18:00:29 UTC
Which versions of MT and MD is this?
Comment 4 Alan McGovern 2011-12-07 18:32:26 UTC
MonoDevelop 2.8.4.2
Installation UUID: f8607b31-a58f-46f8-8022-03584735400a
Runtime:
	Mono 2.10.7 (tarball Mon Dec  5 20:41:19 EST 2011)
	GTK 2.24.8
	GTK# (2.12.0.0)
Apple Developer Tools:
	 Xcode 4.2 (828)
	 Build 4D199
Monotouch: 5.1.1 (Evaluation)
Mono for Android: 4.0.0.60565479 (Evaluation)
Comment 5 Rolf Bjarne Kvinge [MSFT] 2011-12-08 08:33:14 UTC
This has been fixed in master. Should it be backported to the 2.8.4 branch too?
Comment 6 Rolf Bjarne Kvinge [MSFT] 2011-12-08 08:46:45 UTC
Backported to 2.8.4 too.
Comment 7 Atin 2011-12-29 01:02:32 UTC
We go with the mentioned step and don't get any error. 
Please close this issue.

Environments:
MAC 10.7
Mono Develop 2.8.5 Stable.
Mono Touch 5.0.4 Stable
Mono Framework 2.0.7 Beta
Comment 8 PJ 2012-01-04 09:50:24 UTC
Saved as WONTFIX accidentally. It is FIXED.