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

fix: Remove usage of DebuggerSupport and TrimmerRemoveSymbols on release build #1530

Closed
bruno-garcia opened this issue Feb 17, 2024 · 5 comments · Fixed by #1675
Closed

fix: Remove usage of DebuggerSupport and TrimmerRemoveSymbols on release build #1530

bruno-garcia opened this issue Feb 17, 2024 · 5 comments · Fixed by #1675
Assignees
Milestone

Comments

@bruno-garcia
Copy link
Contributor

Arguably a bug report but using TrimmerRemoveSymbols makes it harder to debug things in release builds.

Symbols are usually trimmed to match the trimmed assemblies.

The default behavior should already include smaller symbols. By default .NET splits them (dll/exe + pdb only for symbols). With Portable PDBs they are already quite small. And can be published on snupkg packages and published to nuget.org. Debugger and other tools (such as sentry.io) can fetch the symbols from prod stack traces to add line numbers and file paths, as well as use source link to link to the original source code and fetch surrounding lines of code on stack traces. Source link info lives in the PDB.

So instead of removing symbols we can leave the default behavior, and publish a snupkg making the nupkg itself smaller while bugs easier to resolve.

Finally, using DebuggerSupport=false makes TrimmerRemoveSymbols redundant so we'd need to remove both ones:

<DebuggerSupport>false</DebuggerSupport>
<TrimmerRemoveSymbols>true</TrimmerRemoveSymbols>

I'm happy to make the changes if we agree on this

@dvoituron
Copy link
Collaborator

Hello. Yes that could be a good idea. Could you also verify the SourceLink like describe here?
https://www.meziantou.net/how-to-debug-nuget-packages-using-sourcelink.htm#test-sourcelink-is-e

@vnbaaij
Copy link
Collaborator

vnbaaij commented Mar 8, 2024

Hi Bruno, would still love to get these changes in. You have some time soon to commit them?

@bruno-garcia
Copy link
Contributor Author

Sorry I haven't had the time, if anyone wants to take this over please feel free, I don't want to block it

@vnbaaij
Copy link
Collaborator

vnbaaij commented Mar 11, 2024

Ok, we will take it over.

@bruno-garcia
Copy link
Contributor Author

Thank you!

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 a pull request may close this issue.

3 participants