Bug 22145 - XS/X.iOS debugger detachment from release build iOS sessions.
Summary: XS/X.iOS debugger detachment from release build iOS sessions.
Alias: None
Product: iOS
Classification: Xamarin
Component: Debugger ()
Version: 7.9.1.x
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-08-16 19:54 UTC by Brian Berry
Modified: 2014-09-08 12:57 UTC (History)
3 users (show)

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:

Description Brian Berry 2014-08-16 19:54:48 UTC
Found: As soon as a release build is launched on device, XS
appears to detach from the session and thus not allow
observation of console output without going to the 
Xcode device logging monitoring features.

Steps to reproduce:
   * Launch a release build iOS app (X.iOS/XS version below).
   * Note that the launch button goes from square to triangle
     immediately after launch (looks to me to be an indication
     of disconnect).
   * No console output observed during the run.

Expected: Continued attachment and console relay in release.

   * Xamarin.Android and Xamarin.Mac currently both remain
     attached and relay console output in release builds.
   * This issue came up as I was attempting to diagnose a
     separately filed bug today---one that only occurred in
     release builds.  The need to harvest temporary logging
     from Xcode in this case reduced the related iteration rate.

Version: (Indie Edition)
Hash: 1686c40
Build date: 2014-08-11 15:30:23-0400

Xamarin Studio
Version 5.3 (build 423)
Installation UUID: b577b744-52dd-4f14-848b-8dcc8a961c91
	Mono 3.8.0 ((no/62a857e)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 308000007
Comment 1 Mohit Kheterpal 2014-08-27 07:12:27 UTC
I have checked this issue and getting same behavior as shown in screencast : http://screencast.com/t/LVe9Dn3jL6o

Environment info :
=== Xamarin Studio ===

Version 5.3 (build 435)
Installation UUID: 449f40dd-b3f1-4028-9a6b-cca0d1a2307d
	Mono 3.8.0 ((no/62a857e)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 308000007

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.iOS ===

Version: (Enterprise Edition)
Hash: bbf3ac6
Build date: 2014-08-12 14:15:21-0400

=== Xamarin.Android ===

Version: 4.16.0 (Enterprise Edition)
Android SDK: /Users/360logicaxamarinmacmini/Desktop/android-sdk-macosx_AndÃsdk
	Supported Android versions:
		1.6    (API level 4)
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		3.2    (API level 13)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		4.5    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.Mac ===

Version: (Enterprise Edition)

=== Build Information ===

Release ID: 503000435
Git revision: 1e0c5fa7482a0356a71dfa469a3f71f5478a4660
Build date: 2014-08-25 12:17:42-04
Xamarin addins: 69708b283b171ea053d0edfbf09d98457d21fbee

=== Operating System ===

Mac OS X 10.8.4
Darwin 360Logicas-Mac-mini.local 12.4.0 Darwin Kernel Version 12.4.0
    Sun Mar 10 18:01:10 PDT 2013
    root:xnu-2050.24.6~1/RELEASE_X86_64 x86_64
Comment 2 Rolf Bjarne Kvinge [MSFT] 2014-09-08 09:45:41 UTC
This is by design; the ability to send console output to Xamarin Studio is stripped from the release binary, since it's not useful for shipped apps.

Have in mind that you can view iOS Device Log output from within Xamarin Studio; open View -> Pads -> iOS Device Log.
Comment 3 Brian Berry 2014-09-08 11:19:58 UTC
It's not useful for the typical end user with a shipped app, surely, but it is useful for developers when debugging release-specific issues (e.g., a recent example is https://bugzilla.xamarin.com/show_bug.cgi?id=22143).

As I indicated above (and you re-iterated), the Xcode log is available.  However, hopping to and from its facilities from the XS debugger reduces iteration time significantly when dealing with such problems.

Please note also that Xcode itself provides this ability (NSLog propagation to the in-IDE output window) with release targets.  And Xcode is the sanctioned, canonical development environment for the iOS/OSX universe.  Xamarin's design choice goes beyond what is done by Apple in ways that limit productivity with observed use cases.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2014-09-08 11:34:47 UTC
You can put the iOS Device Log pad next to the Application Output pad in Xamarin Studio (or show it instead of the Application Output pad), it's not necessary to hop back and forth anywhere. So you have an in-iDE output window just like in Xcode, it's just not the same window as normal.
Comment 5 Brian Berry 2014-09-08 12:57:36 UTC
That is certainly helpful, thanks.

You are still faced with the noise of the general device log (Xcode provides at least basic search support in theirs, not so with XS).  So trying to hunt down your few lines of critical logging among the see of wifid notices, other system events, etc., remains a process drag---still a copy/paste-elsewhere/filter+search exercise evident if you don't catch what you're after immediately.

Xcode's solution is to provide the raw device logs when you need it (e.g. perhaps your bug is related to said events), plus application-specific (focused) output when you don't.  No need to look at two panes in general and no fundamental workflow difference between debug/release in this regard.

Xamarin has simply chosen to be different (and asymmetric) here.