-
Notifications
You must be signed in to change notification settings - Fork 565
Description
It appears this change might have been introduced in 77ab240. In particular, before that change, only framework assemblies were copied into android/assets/shrunk, but now all assemblies are copied there. It looks like either (a) the .pdb files need to be copied to the android/assets/shrunk directory too or (b) the BuildApk task needs to use a different strategy to locate them since it currently assumes they are alongside the assemblies:
Perhaps of interest, there is already a _ResolvedSymbols MSBuild item list that contains the symbol locations, but that item list is not currently used in the BuildApk task.
Steps to reproduce
- Create a new Android App > Single View App project.
- Ensure the active configuration is Debug.
- Open the Android Options section of the Visual Studio project property pages.
- Disable Use Fast Deployment and Use Shared Runtime.
- Set Linking to Sdk Assemblies Only in the Visual Studio project property pages.
- Set a breakpoint in the
Activity.OnCreate()override. - Start debugging the app.
Expected behavior
- The APK should contain .pdb files.
- The debugger should break on the breakpoint.
Actual behavior
- The APK does not contain any .pdb files.
- The debugger does not break on the breakpoint.
Partial workaround
In Visual Studio 2019 version 16.6 or higher, set Build > Advanced > Debugging information to Embedded in the Visual Studio project properties pages. This corresponds to the embedded value for the DebugType MSBuild property in the .csproj file:
<PropertyGroup>
<DebugType>embedded</DebugType>
</PropertyGroup>This is only a partial workaround because some projects might have reasons to prefer not to use embedded debugging symbols. Additionally, since embedded debugging symbols are relatively new, they might potentially have other unexpected consequences.
Version information
Affected versions
- Visual Studio 2019 Int Preview version 16.8 Preview 2
- Xamarin.Android SDK version 11.0.99.34 (d16-8/49ba90e)
- Visual Studio 2019 version 16.5.5
- Xamarin.Android SDK version 10.2.0.100 (d16-5/988c811)
Last known version that includes the .pdb files in the APK in this scenario
- Visual Studio 2019 version 16.4.11
- Xamarin.Android SDK version 10.1.4.0 (d16-4/e44d1ae)