Enables source debugging for .NET and C++ binaries by embedding source control metadata into built assets.
Source Link is a system that enables source debugging for .NET and C++ binaries by embedding source control metadata into built assets like PDBs and packages. It solves the problem of debugging into NuGet dependencies or compiled libraries where source code is not locally available, allowing debuggers to fetch the exact source from repositories automatically.
Library authors distributing .NET NuGet packages or C++ libraries who want to provide a better debugging experience for their users, and developers who need to debug into third-party dependencies.
Developers choose Source Link because it provides a seamless, zero-configuration debugging experience for dependencies, supports multiple source control providers, and is integrated into the .NET SDK and Visual Studio, requiring minimal effort to set up.
Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Visual Studio automatically downloads and displays source code from repositories when debugging, enabling breakpoints on NuGet dependencies without manual setup, as shown in the README's example screenshot.
Works with multiple providers like GitHub, Azure Repos, GitLab, and Bitbucket, each with dedicated NuGet packages and configuration options, making it versatile for diverse hosting environments.
Starting with .NET 8, Source Link is included by default for major providers, reducing setup effort and ensuring compatibility with modern .NET projects without extra package references.
Supports downloading source from private repositories requiring authentication, such as private GitHub or Azure DevOps repos, enhancing security and flexibility for enterprise use.
For older GitLab (<12.0) or Bitbucket (<4.7) versions, additional XML configuration like SourceLinkGitLabHost is required, adding setup overhead and potential for errors.
In C++ projects, only source file mapping is supported; features like source embedding and embedding commit SHA in binaries are not available, restricting debugging capabilities.
Each PDB distribution method has drawbacks: .snupkg doesn't support Windows PDBs or all package feeds, while embedding increases binary size and can impact performance.