-
Notifications
You must be signed in to change notification settings - Fork 2
Enable Source Link for better debugging experience #140
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request enables Source Link support for the LightProto library to improve the debugging experience when consuming the package from NuGet. The changes configure MSBuild properties for deterministic builds, symbol package generation, and add the Microsoft.SourceLink.GitHub package reference.
- Adds MSBuild properties to enable deterministic builds and symbol generation
- Integrates Microsoft.SourceLink.GitHub for source code debugging support
- Configures symbol package format as snupkg for NuGet compatibility
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <!-- Enable Source Link for better debugging experience --> | ||
| <PropertyGroup> | ||
| <Deterministic>true</Deterministic> | ||
| <ContinuousIntegrationBuild>true</ContinuousIntegrationBuild> |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting ContinuousIntegrationBuild to true unconditionally will break local development builds. This property should only be set to true in CI environments. When enabled for local builds, it causes Source Link to embed absolute file paths that won't exist on developers' machines, making debugging problematic.
The recommended approach is to use a condition that checks if the build is running in a CI environment. You can either:
- Remove this line and let the CI workflow set it via command line argument (e.g., dotnet pack -p:ContinuousIntegrationBuild=true)
- Use a condition like: Condition="'$(CI)' == 'true' OR '$(GITHUB_ACTIONS)' == 'true'"
Most CI systems automatically set environment variables that can be detected. GitHub Actions sets GITHUB_ACTIONS=true.
| <ContinuousIntegrationBuild>true</ContinuousIntegrationBuild> | |
| <ContinuousIntegrationBuild Condition="'$(CI)' == 'true' OR '$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild> |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #140 +/- ##
=======================================
Coverage 98.39% 98.39%
=======================================
Files 99 99
Lines 2186 2186
Branches 231 231
=======================================
Hits 2151 2151
Misses 23 23
Partials 12 12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This pull request improves the debugging experience for the
LightProtoproject by enabling Source Link and configuring symbol package generation. These changes will make it easier to debug into the source code when using the library from NuGet.Build and debugging improvements:
snupkg) in the project file (LightProto.csproj).Microsoft.SourceLink.GitHubto support Source Link integration for better debugging with source code.