Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable SourceLink for Xamarin.Forms #6886

Merged
merged 10 commits into from Aug 1, 2019

Conversation

@jfversluis
Copy link
Member

commented Jul 16, 2019

Description of Change

Adds SourceLink support to Xamarin.Forms packages

Will work for:

  • iOS and Android in VSMac (should be implemented in 8.3)
  • UWP, WPF in VS2019, mono debugger support coming

What changed:

  • Added some entries in the Build.props file to enable SourceLink and link it with out Github repo.
  • Removed all DebugType tags from the relevant csproj files and moved them to the Build.props file and changed the debug type to portable in the process.

More info: https://github.com/dotnet/sourcelink

Issues Resolved

API Changes

None

Platforms Affected

N/A

Behavioral/Visual Changes

None

Before/After Screenshots

Not applicable

Testing Procedure

If you have a copy of VSMac which has SourceLink support already enabled, just debug your app as you normally would but notice how you can step into the Xamarin.Forms source code

PR Checklist

  • Has automated tests
  • Rebased on top of the target branch at time of PR
  • Changes adhere to coding standard
@samhouts samhouts moved this from In Review to In Progress in vNext (4.3.0) Jul 16, 2019
@samhouts samhouts added p/macOS inactive and removed inactive labels Jul 16, 2019
@nosami

This comment has been minimized.

Copy link
Member

commented Jul 17, 2019

SourceLink is being worked on for VSMac right now.

Unfortunately for the initial cut, it will only support the *.pdb file being inside the *.nupkg. Limitations in Android debugging meant that we couldn't easily support .snupkg symbols.

@@ -40,6 +40,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>

This comment has been minimized.

Copy link
@StephaneDelcroix

StephaneDelcroix Jul 17, 2019

Member

I think the value you're looking for is portable, and this condition could be moved to Directory.Build.props

This comment has been minimized.

Copy link
@nosami

nosami Jul 17, 2019

Member

<DebugType>full<DebugType> is identical to portable on Mac, but not on Windows. full on Windows is a legacy pdb format.

portable means the same thing on both platforms (portable pdb format), so that should be used.

Copy link
Contributor

left a comment

  • If merging this in breaks being able to debug locally then I'd prefer we wait. I heavily use a local source repo at d:\a\1\s to debug and if merging this in breaks that then let's wait to merge until the IDE actually supports it.

More info about my steps here
https://shaneneuville.com/xamarin/forms/debugging/2018/02/01/debug-tips.html

  • Source link support currently does work for UWP/WPF so we could merge this in with a flag to only enable for UWP/WPF currently and then flip that off once the IDE's support it for Android/iOS
    • if we merge this in for UWP/WPF we should include a documentation update indicating that it only works for UWP/WPF currently
jfversluis added 5 commits Jul 18, 2019
This reverts commit 1c5b66c.
@samhouts

This comment has been minimized.

Copy link
Member

commented Jul 23, 2019

@StephaneDelcroix Your label removal is futile. This technically touches all those platforms, so it shall be labeled as such! muwhahaha

@rmarinho rmarinho merged commit b334548 into master Aug 1, 2019
8 checks passed
8 checks passed
Xamarin Forms Build #4.3.0.2875052+41-sha.f24b34ee-azdo.2875052 succeeded
Details
Xamarin Forms (Build Windows Phase Debug,any cpu) Build Windows Phase Debug,any cpu succeeded
Details
Xamarin Forms (Nuget Phase) Nuget Phase succeeded
Details
Xamarin Forms (OSX Phase) OSX Phase succeeded
Details
Xamarin Forms (Prepare Build Phase) Prepare Build Phase succeeded
Details
Xamarin Forms (Test Phase Debug) Test Phase Debug succeeded
Details
license/cla All CLA requirements met.
Details
xamarin-forms-ci #4.3.0.1374+18-pr.6886-sha.011f5fbb-azdo.4569 succeeded
Details
vNext (4.3.0) automation moved this from In Progress to Done Aug 1, 2019
@samhouts samhouts moved this from Done to In Progress in vNext (4.3.0) Aug 1, 2019
@jfversluis jfversluis deleted the enable-sourcelink branch Aug 1, 2019
@samhouts samhouts moved this from In Progress to Done in vNext (4.3.0) Aug 1, 2019
samhouts added a commit to rookiejava/Xamarin.Forms that referenced this pull request Aug 16, 2019
* Added sourcelink config to Directory.Build.props

* Only enable SourceLink for release builds

* Added debugtypes to mac projects

* pdb in nupkg files

* Revert "Added debugtypes to mac projects"

This reverts commit 7235beb.

* Update Directory.Build.props

* Update Directory.Build.props

* Revert "Update Directory.Build.props"

This reverts commit 1c5b66c.

* Added DebugType portable to csprojs

* Removed all redundant csproj debugtype tags
@samhouts samhouts removed this from Done in vNext (4.3.0) Sep 3, 2019
@samhouts samhouts added this to the 4.3.0 milestone Sep 11, 2019
@samhouts samhouts added this to Done in vNext (4.3.0) Sep 11, 2019
felipebaltazar added a commit to felipebaltazar/Xamarin.Forms that referenced this pull request Oct 16, 2019
* Added sourcelink config to Directory.Build.props

* Only enable SourceLink for release builds

* Added debugtypes to mac projects

* pdb in nupkg files

* Revert "Added debugtypes to mac projects"

This reverts commit 7235beb.

* Update Directory.Build.props

* Update Directory.Build.props

* Revert "Update Directory.Build.props"

This reverts commit 1c5b66c.

* Added DebugType portable to csprojs

* Removed all redundant csproj debugtype tags
felipebaltazar added a commit to felipebaltazar/Xamarin.Forms that referenced this pull request Oct 16, 2019
* Added sourcelink config to Directory.Build.props

* Only enable SourceLink for release builds

* Added debugtypes to mac projects

* pdb in nupkg files

* Revert "Added debugtypes to mac projects"

This reverts commit 7235beb.

* Update Directory.Build.props

* Update Directory.Build.props

* Revert "Update Directory.Build.props"

This reverts commit 1c5b66c.

* Added DebugType portable to csprojs

* Removed all redundant csproj debugtype tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.