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

[WIP] add source link support to portable pdbs #7726

Closed
wants to merge 4 commits into from

Conversation

ctaggart
Copy link

I thought EntityFramework would make a good example for an E2E experience with Portable PDBs that have source link support. dotnet/roslyn#12759

To get an idea what these changes do, please read the readme that I updated today:
https://github.com/ctaggart/SourceLink

Then try:

git clone git@github.com:ctaggart/EntityFramework.git -c core.autocrlf=input
cd .\EntityFramework\src\Microsoft.EntityFrameworkCore.Relational.Design
dotnet build
dotnet sourcelink test .\bin\Debug\netstandard1.3\Microsoft.EntityFrameworkCore.Relational.Design.pdb

Example:

PS C:\Users\camer\cs\EntityFramework\src\Microsoft.EntityFrameworkCore.Relational.Design> dotnet sourcelink test .\bin\Debug\netstandard1.3\Microsoft.EntityFrameworkCore.Relational.Design.pdb
sourcelink test passed
PS C:\Users\camer\cs\EntityFramework\src\Microsoft.EntityFrameworkCore.Relational.Design> dotnet sourcelink test .\bin\Debug\netstandard1.3\Microsoft.EntityFrameworkCore.Relational.Design.pdb
sourcelink test passed
PS C:\Users\camer\cs\EntityFramework\src\Microsoft.EntityFrameworkCore.Relational.Design> dotnet sourcelink print-json .\bin\Debug\netstandard1.3\Microsoft.EntityFrameworkCore.Relational.Design.pdb
{"documents":{"C:\\Users\\camer\\cs\\EntityFramework\\*":"https://raw.githubusercontent.com/ctaggart/EntityFramework/f36ce80a93d9f698ff6b70207d2b83b5b11cf93b/*"}}
PS C:\Users\camer\cs\EntityFramework\src\Microsoft.EntityFrameworkCore.Relational.Design> dotnet sourcelink print-urls .\bin\Debug\netstandard1.3\Microsoft.EntityFrameworkCore.Relational.Design.pdb
ab1db8972c75cdcc0680a87e3c7e5048fa493a5c sha1 csharp C:\Users\camer\cs\EntityFramework\src\Shared\SharedTypeExtensions.cs
https://raw.githubusercontent.com/ctaggart/EntityFramework/f36ce80a93d9f698ff6b70207d2b83b5b11cf93b/src/Shared/SharedTypeExtensions.cs
...

Including the Portable PDBs in the package is doable. It would be easier if --include-portable-pdbs was added. NuGet/Home#4142 (comment)

@dnfclas
Copy link

dnfclas commented Feb 26, 2017

@ctaggart,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@@ -0,0 +1,11 @@
<Project>
<PropertyGroup>
<SourceLinkCreate>true</SourceLinkCreate>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forcing it on with true is just to show that it works. The line should be removed before a merge.

@bricelam
Copy link
Contributor

bricelam commented Feb 27, 2017

@DamianEdwards @Eilon Has there been any discussion of doing this all-up on the ASP.NET packages?

@Eilon
Copy link
Member

Eilon commented Feb 27, 2017

We should discuss. Whatever we do, we should do consistently in all the repos.

@ctaggart
Copy link
Author

@bricelam @Eilon @DamianEdwards the plan has been discussed in this issue: aspnet/Universe#131 (comment)

@ctaggart
Copy link
Author

ctaggart commented Mar 4, 2017

Closing this pull request. It was just an example of how easy it is to add.

@ctaggart ctaggart closed this Mar 4, 2017
@paulomorgado
Copy link
Contributor

What's preventing this from happening?

@Eilon
Copy link
Member

Eilon commented Oct 9, 2018

@paulomorgado can you provide info on what isn't working? I think the PDBs are source linked and on the Microsoft symbol server so in theory everything should be working.

@paulomorgado
Copy link
Contributor

@Eilon, I tried to set up a function breakpoint inside EF Core and tried to step into ToListAsync and nothing happened.

Besides the fact that everyone these days are using embedded PDBs or packaging them with the libraries and linking the PBDs to the source (GitHub, in this case), what do I have to do to step into EF Core's code?

@Eilon
Copy link
Member

Eilon commented Oct 9, 2018

@paulomorgado I saw in another issue that there was an issue with the symbol servers just recently and that it started working again.

I found a blog post describing the settings you need to enable the source stepping to work: https://www.stevejgordon.co.uk/debugging-asp-net-core-2-source

Have you followed those steps and it's still not working?

@paulomorgado
Copy link
Contributor

I had the Microsoft Symbol Servers location unchecked because

The performance of remote symbol stores can vary due to latency, bandwidth, or availability of servers. Debugging performance can be improved by selecting the option to load only specified modules when enabling this server.

You really should make the change to https://github.com/dotnet/sourcelink

@Eilon
Copy link
Member

Eilon commented Oct 10, 2018

@paulomorgado sorry I'm not sure what change you are proposing, can you provide more details?

@paulomorgado
Copy link
Contributor

I'm proposing that, instead of using the symbol server, package the PDBs linked to the GitHub source. Have you looked at the link, @Eilon? It even mentions that it builds on top of @ctaggart (who opened this issue).

@Eilon
Copy link
Member

Eilon commented Oct 10, 2018

@paulomorgado there was a discussion a long time ago and we concluded that the overall best solution in terms of supportability and functionality was to use symbol servers. It works cross platform, and it works in the broadest set of tools, and doesn't affect anyone not interested in symbols.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants