Bug 30334 - Debug symbols ignored without any build warnings or errors when "Embed assemblies in native code" is enabled
Summary: Debug symbols ignored without any build warnings or errors when "Embed assemb...
Status: REOPENED
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 5.1
Hardware: PC All
: Normal normal
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks: 30335
  Show dependency tree
 
Reported: 2015-05-22 01:12 UTC by Brendan Zagaeski (Xamarin Support)
Modified: 2015-05-29 16:39 UTC (History)
4 users (show)

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


Attachments
Test case (31.15 KB, application/zip)
2015-05-22 01:12 UTC, Brendan Zagaeski (Xamarin Support)
Details
Diagnostic build and logcat logs (18.31 KB, application/zip)
2015-05-22 01:13 UTC, Brendan Zagaeski (Xamarin Support)
Details

Description Brendan Zagaeski (Xamarin Support) 2015-05-22 01:12:17 UTC
Created attachment 11294 [details]
Test case

Debug symbols ignored without any build warnings or errors when "Embed assemblies in native code" is enabled


I believe this is just a specific case of a broader problem that the permitted combinations of the Android "Packaging and Deployment" settings need to be reviewed. I will file a separate follow-up bug for that broader discussion.




## Regression status: most likely NOT a regression

BAD: Xamarin.Android 5.1.2.0 
BAD: Xamarin.Android 4.20.2.1



And per Bug 15457, Comment 2, I suspect this issue is really just a known limitation of the feature:
> Embed Assemblies into native code is not supported for Debug builds.




## Steps to reproduce

1. Ensure you're using an Enterprise license.

2. Set a breakpoint in the attached test case. For example, set a breakpoint in the contents of the `button.Click` event handler.

3. Build and run the app on Android emulator or device.

4. Tap the button.




## Results

The build produces no warnings or errors, but it is not possible to hit any breakpoints.




## Expected results

Since the build uses 2 settings that are incompatible (`DebugSymbols` and `BundleAssemblies`), perhaps it should fail with an error, or at least emit a warning?




## Version info

- Android NDK r10d
- Android SDK Tools 24.2
- Android SDK Platform-tools 22
- Android SDK Build-tools 21.1.1


### OS X 10.10.3

=== Xamarin Studio ===

Version 5.9.2 (build 2)
Installation UUID: 2c0ea975-8f73-4920-8414-3e9ae359fbf4
Runtime:
	Mono 4.0.1 ((detached/11b5830)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400010043

=== Xamarin.Android ===

Version: 5.1.2.0 (Enterprise Edition)
Android SDK: /Users/macuser/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		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)
		5.0    (API level 21)
Java SDK: /usr
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)

=== Build Information ===

Release ID: 509020002
Git revision: 43735a4b905b571f69cf9428a3ea7b52aef55476
Build date: 2015-05-18 09:38:12-04
Xamarin addins: ab18ddff45f507ed74f36c2b65df9aee22e28a56
Comment 1 Brendan Zagaeski (Xamarin Support) 2015-05-22 01:13:03 UTC
Created attachment 11295 [details]
Diagnostic build and logcat logs
Comment 2 Tajinder Singh 2015-05-22 08:13:54 UTC
I have tried to reproduce this issue and able to reproduce this issue by given description and steps. Not hit breakpoint when select checkbox as "Embed Assemblies in native code", perhaps it should fail with an error, or at least emit a
warning?

Please Refer to screencast: http://www.screencast.com/t/GlMWKXksCqsR
ide log: https://gist.github.com/saurabh360/5a1a503d03dfb1f793dd

Environment Info:
=== Xamarin Studio ===

Version 5.9.2 (build 2)
Installation UUID: 642986ef-b668-4108-b6e5-f58c62d668b6
Runtime:
	Mono 4.0.1 ((detached/11b5830)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400010043

=== Apple Developer Tools ===

Xcode 6.3 (7569)
Build 6D570

=== Xamarin.iOS ===

Version: 8.10.1.63 (Enterprise Edition)
Hash: fce006e
Branch: master
Build date: 2015-05-21 12:10:06-0400

=== Xamarin.Android ===

Version: 5.1.2.1 (Enterprise Edition)
Android SDK: /Users/360logica/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.0.1.64 (Enterprise Edition)

=== Build Information ===

Release ID: 509020002
Git revision: 43735a4b905b571f69cf9428a3ea7b52aef55476
Build date: 2015-05-18 09:38:12-04
Xamarin addins: ab18ddff45f507ed74f36c2b65df9aee22e28a56

=== Operating System ===

Mac OS X 10.10.0
Darwin 360Logicas-MacBook-Pro.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 3 Jonathan Pryor 2015-05-22 13:47:42 UTC
This isn't supported, and (at present) isn't *supportable*.

"Bundle assemblies into native code" is mkbundle(1), and mkbundle doesn't embed and register symbol files.

That could be fixed, but unless there's some compelling business reason to do so, I don't see much point in trying to support debugging with Bundle assemblies into native code. Why do that?
Comment 4 Brendan Zagaeski (Xamarin Support) 2015-05-22 13:57:42 UTC
My main objective with this bug was actually about the "without any build warnings or errors" part of the problem. Since it is not supportable, should we have a build error or warning when those 2 settings are set at the same time?

> perhaps it should fail with an error, or at least emit a warning?
(comment 0)
Comment 5 Jonathan Pryor 2015-05-22 14:04:58 UTC
@Dean: Does it make sense to warn -- or do anything at all -- when $(DebugSymbols) is True and $(BundleAssemblies) is True?
Comment 7 Brendan Zagaeski (Xamarin Support) 2015-05-22 21:45:24 UTC
I should probably also note that XamarinVS already enforces one restriction related to BundleAssemblies via the GUI property dialog: it requires that you _disable_ "Use Fast Deployment" in order to enable BundleAssemblies.

So if it would be preferable to stay consistent with that strategy and add an _IDE_ restriction [1] rather than a _build_ warning or error, I'd be OK with that too. (There's some additional context about this in non-public Bug 30335 that might be helpful.)


[1] The rule would require that you disable DebugSymbols in order to enable BundleAssemblies.
Comment 8 dean.ellis 2015-05-26 06:34:22 UTC
We could add a warning, but it would probably be better dealt with in the IDE's, another warning would probably just get lost in a sea of warnings that dev's ignore anyway.

Note You need to log in before you can comment on or make changes to this bug.