Bug 54587 - [VS-MAC][7.0 build 2710][Debugger]-unable to hit Breakpoints explicitly on last three cases mentioned on sample given in Android debugging project.
Summary: [VS-MAC][7.0 build 2710][Debugger]-unable to hit Breakpoints explicitly on la...
Status: VERIFIED NOT_REPRODUCIBLE
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger ()
Version: 7.3 (15.2)
Hardware: PC Mac OS
: High major
Target Milestone: 15.2
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-04-06 11:13 UTC by Gaurav Ganorkar
Modified: 2017-04-11 16:47 UTC (History)
4 users (show)

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


Attachments
Contains IDE logs also gist of application output is attached in comment (46.23 KB, application/zip)
2017-04-06 11:13 UTC, Gaurav Ganorkar
Details


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:
VERIFIED NOT_REPRODUCIBLE

Description Gaurav Ganorkar 2017-04-06 11:13:22 UTC
Created attachment 21255 [details]
Contains IDE logs also gist of application output is attached in comment

Description
-Unable to hit breakpoint in PCL VesselService.cs file given in Android.Debugging project in sample "CrossPlatformDebugging"


Test Environment
Verified on both Sierra and El capitan with the Build version given below

=== Visual Studio for Mac Preview ===

Version Preview 6 (7.0 build 2710)
Installation UUID: a676468e-a063-44dc-9eb6-9787862f31d7
Runtime:
	Mono 5.0.0.42 (2017-02/dda961c) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 500000042

=== NuGet ===

Version: 4.0.0.2323

=== Xamarin.Profiler ===

'/Applications/Xamarin Profiler.app' not found

=== Apple Developer Tools ===

Xcode 8.0 (11246)
Build 8A218a

=== Xamarin.Android ===

Version: 7.3.0.1 (Visual Studio Enterprise)
Android SDK: /Users/globallogic/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.4    (API level 19)
		4.4.87 (API level 20)
		6.0    (API level 23)
		7.1    (API level 25)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.4
SDK Build Tools Version: 25.0.1

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin.iOS ===

Version: 10.10.0.0 (Visual Studio Enterprise)
Hash: fe490c24
Branch: d15-2
Build date: 2017-04-04 16:48:23-0400

=== Xamarin.Mac ===

Version: 3.4.0.0 (Visual Studio Enterprise)

=== .NET Core ===

Runtime: Not installed
SDK: Not installed
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.0.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin Inspector ===

Version: 1.1.1.0
Hash: 607f1ba
Branch: 1.1-release
Build date: Thu, 16 Feb 2017 18:57:39 GMT

=== Build Information ===

Release ID: 700002710
Git revision: 85d6914d5975d868f89503b940a9a5d1f433963c
Build date: 2017-04-04 20:45:31-04
Xamarin addins: 393161ecace6de5aa9d85ce62b4a26b26c594c07
Build lane: monodevelop-lion-d15-2

=== Operating System ===

Mac OS X 10.11.6
Darwin NAG1-DMAC-N07193 15.6.0 Darwin Kernel Version 15.6.0
    Thu Jun 23 18:25:34 PDT 2016
    root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64


Steps to reproduce
1)Open Project QualityAssurance/Manual/CrossPlatformDebugging/CrossPlatformDebugging.sln
2) Open the project properties on Android.Debugging, uncheck to disable 'Bundle assemblies into native code'
3) Delete bin and obj folders from
   XamFormsTestApp.Data (PCL)
   XamFormsTestApp(PCL)
   XamFormsTestApp.Droid (App)
4) Set Breakpoint in PCLCustomerSample>Services in VesselService.cs file on line 38
5) Deploy to Android Device (Google Nexus 7)
6) Determine if breakpoint is hit on line 38
7) Stop debugging session
8) Delete bin and obj folders from
   XamFormsTestApp.Data (PCL)
   XamFormsTestApp(PCL)
   XamFormsTestApp.Droid (App)
9) Set Breakpoint in XamFormsTestAp in VesselService.cs file on line 73
10) Deploy to Android Device (Google Nexus 7)
11) Click Vessel 1 in App on phone
12) Determine if breakpoint is hit on line 73

Observation - Breakpoint is not getting Hit on Line number 38 and 73. Unable to hit breakpoint in VesselService.cs file given in Android.Debugging project

https://gist.github.com/ganorkargaurav/961be1f6ae288a10c95a22c5ee42202b

Stack trace attached contains logs
Comment 1 David Karlaš 2017-04-07 11:50:38 UTC
I think problem is on XA side because doing `adb shell ls /storage/emulated/0/Android/data/com.companyname.android.debugging/files/.__override__/` shows that Portable .pdb is not copied... Disabling "Fast Assembly Deployment" fixed it for me... My wild guess is... problem is in https://github.com/xamarin/androidtools/blob/ff1b3d6f2351fa925b46289beb0efcd6b935299a/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs#L482
Comment 2 Jonathan Pryor 2017-04-10 15:26:46 UTC
@David: What XA version are you using? Is it d15-2/Xamarin.Android 7.3.0?

My current understanding is that Xamarin Studio uses/will use Xamarin.Android's `Install` target -- which brings it inline with Visual Studio, and reduces duplicate code (yay!) -- and thus that `AndroidDeploySession` is not the entire picture.

The `Install` target uses the `<InstallPackageAssemblies/>` task, which explicitly checks for `.pdb` files for installation:

https://github.com/xamarin/monodroid/blob/5e1f82a/tools/msbuild/Tasks/InstallPackageAssemblies.cs#L179
https://github.com/xamarin/monodroid/blob/d15-2/tools/msbuild/Tasks/InstallPackageAssemblies.cs#L179

Additionally, when I use monodroid/master's `Install` target, the `.pdb` file *is* installed:

> $ xbuild /t:Install /v:diag Android.Debugging.csproj
> $ adb shell ls -l /storage/emulated/0/Android/data/com.companyname.android.debugging/files/.__override__ | grep pdb
> -rw-rw---- 1 u0_a211 sdcard_rw   6872 2017-04-10 11:18 Android.Debugging.pdb
> -rw-rw---- 1 u0_a211 sdcard_rw   5436 2017-04-10 11:18 XamFormsTestApp.Data.pdb

This is also using system mono 4.9.3:

> $ mono --version
> Mono JIT compiler version 4.9.3 (2017-02/c52c4bd Mon Mar  6 18:14:39 EST 2017)

Note: I was *not* able to build+install Android.Debugging.csproj using Xamarin Studio 6.3 (build 858); it reported an error in the `<ResolveAssemblyReference/>` task.
Comment 3 Jonathan Pryor 2017-04-10 17:58:51 UTC
Neither Peter Collins nor I am able to repro this issue.
Comment 4 Gaurav Ganorkar 2017-04-11 13:51:29 UTC
I am still able to reproduce this issue on the latest VSFM build (2770).


I am not able to hit the Breakpoint explicitly on last three cases mentioned on Android debugging project. Just to be explain it in details. under Android Debugging projects we have around 25 cases which need to be validated for breakpoints. Out of this 25 sample test cases the last three cases where failing for breakpoint.

Below is the github link for sample project consisting of fail 3 sample cases.
https://github.com/xamarin/QualityAssurance/tree/master/Manual/CrossPlatformDebugging/Bug30505

Note: On Previous XS build for MAC (i.e before 2710), above breakpoints were getting hit for the same github sample
Comment 5 Gaurav Ganorkar 2017-04-11 15:57:27 UTC
Cloning the repositories on to different path  fixed the issue. Hence marking this issue as Resolved fixed.
Comment 6 Peter Collins 2017-04-11 16:47:43 UTC
I'm going to update as NOT_REPRODUCIBLE I think, as that more accurately describes the investigation. The affected sample has been uploaded to slack, but I still was unable to manage a reproduction on both a Nexus 5x and Oneplus One.

Test case:
https://files.slack.com/files-pri/T03C6CW9H-F4YC2FX38/download/crossplatformdebugging.zip

The only _potentially_ relevant differences in this test case were:
* Fastdev was disabled
* Shared runtime was disabled
* The Debug property group was missing an `AndroidSupportedAbis` declaration. However to my best of my knowledge the armeabi-v7a value will be used as a default in this case either way.