-
Notifications
You must be signed in to change notification settings - Fork 51
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
Can't debug into GAX NuGet packages #591
Comments
Sample .NET 6 console app - I can't step into using Google.Api.Gax.Grpc;
var ts = TimeSpan.FromMinutes(1);
Predicate<Exception> predicate = ex => false;
var settings = RetrySettings.FromConstantBackoff(10, ts, predicate);
var backoff = settings.NextBackoff(TimeSpan.Zero); Will investigate other packages we (or I) publish (which may have different settings). Packages to check:
|
Interestingly, SourceLink does work when hitting F12 with the cursor on "FromConstantBackoff". Just tested Noda Time as well with |
I can step into Json.NET code. But not:
Hmm. |
It's possible that this is due to not using Portable PDB files. See https://endjin.com/blog/2022/05/debugging-nuget-packages-understanding-debugging-symbols-and-using-source-link |
I've tried publishing with portable PDBs (JonSkeet.DemoUtil) - no joy. It's really unclear to me what's going on here. |
Aha - I think the problem is that I suspect all of this is related to dotnet/sdk#1458, which looks like it enables a workaround via a new project property (CopyDebugSymbolFilesFromPackages=true) but only as of .NET SDK 7.0.100 RC2. I'm going to test that on my personal machine. Assuming that doesn't become the default, we might want to consider publishing snupkg files instead, as it looks like that does already work out of the box. |
(Ah - 7.0 RC2 isn't out yet. Only 7.0 RC1 is available right now.) |
Publishing a snuget package, I can navigate to the code, but I still can't debug into it :( |
Retested with .NET 7 and VS 2022 version 17.4.1 - still broken by default. But, importantly, setting CopyDebugSymbolFilesFromPackages to true does fix this. Hooray! I think we can just document this for now. |
Closing this now, as we've documented it in https://cloud.google.com/dotnet/docs/reference/help/troubleshooting#how-can-i-debug-into-the-libraries |
Our .nupkg files contain pdbs, but for some reason I'm not able to step into them in the debugger.
It's possible this is just with local package sources, but we should investigate.
The text was updated successfully, but these errors were encountered: