Bug 60704 - Fast Deployment prevents debugging an Xamarin.Android Application on < API 17
Summary: Fast Deployment prevents debugging an Xamarin.Android Application on < API 17
Status: CONFIRMED
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger ()
Version: 8.1 (15.5)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-11-15 19:37 UTC by Jon Douglas [MSFT]
Modified: 2017-11-16 20:35 UTC (History)
1 user (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 for Bug 60704 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Jon Douglas [MSFT] 2017-11-15 19:37:35 UTC
# Description:

On Android APIs < 17 that are not deprecated yet (16, 15), it is not possible to attach a debugger to debug an application from a new template.

Instead we get a familiar message in the output:

Couldn't connect to logcat, GetProcessId returned: 0

Here are related adb logcat logs associated with this issue:

11-15 12:08:02.883 2071-2071/App34.App34 W/monodroid-debug: Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:29388,server=y,embedding=1
11-15 12:08:03.053 2071-2071/App34.App34 W/monodroid-debug: Accepted stdout connection: 36
11-15 12:08:03.093 2071-2071/? A/monodroid: No assemblies found in '/data/data/App34.App34/files/.__override__' or '/mnt/sdcard/Android/data/App34.App34/files/.__override__'. Assuming this is part of Fast Deployment. Exiting...
11-15 12:08:03.103 1159-1159/? D/Zygote: Process 2071 exited cleanly (65)
11-15 12:08:03.103 1427-1438/system_process I/ActivityManager: Process App34.App34 (pid 2071) has died.
11-15 12:08:03.103 1427-1438/system_process W/ActivityManager: Force removing ActivityRecord{a7587cc0 App34.App34/md5864c01e54821602b3c5a6c09f31ec088.MainActivity}: app died, no saved state

Full Gist: https://gist.github.com/JonDouglas/f19e2ceb2df2b29ab177e74ac7fbc9af

This seems to be a bug in Fast Deployment given that turning off Fast Deploy allows debugging to work.

# Reproduction:

1. Create File->New Xamarin.Android Application
2. Change the Minimum Android Version to 15 so the API 16 emulator will show up in the device list
3. Deploy application to API 16 emulator
4. You should observe the following item in Output: Couldn't connect to logcat, GetProcessId returned: 0
(Note: Visual Studio for Mac will not display this output but rather will just hang on deployment)

I have however seen output on the lines of:

Error type 3
Error: Activity class {com.companyname.myappname/<md5hash>.MainActivity} does not exist.

# Workaround:

Disable Fast Deploy