在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:GitTools/GitLink开源软件地址:https://github.com/GitTools/GitLink开源编程语言:C# 98.6%开源软件介绍:GitLinkGitLink lets users step through your code hosted on GitHub! Help make .NET open source projects more accessible by enabling this for your .NET projects, it's just a single additional step in your build. See the list of projects using GitLink. -- Important GitLink was formerly named GitHubLink. By adding support to more Git hosting services the name seemed not covering the whole package. The old GitHubLink packages on NuGet and Chocolatey will no longer be updated or maintained. Private git repositories might be problematic. More info. -- GitLink makes symbol servers obsolete which saves you both time with uploading source files with symbols and the user no longer has to specify custom symbol servers (such as symbolsource.org). The advantage of GitLink is that it is fully customized for Git. It also works with GitHub or BitBucket urls so it does not require a local git repository to work. This makes it perfectly usable in continuous integration servers such as Continua CI. Updating all the pdb files is very fast. A solution with over 85 projects will be handled in less than 30 seconds. When using GitLink, the user no longer has to specify symbol servers. The only requirement is to ensure the check the How to use GitLink to enable source stepping on your own projectsNuGet/MSBuild integrationThe simplest way to use GitLink is to install its NuGet package into your project.
Once installed, it automatically integrates with MSBuild to add source download instructions to your PDB. Command line toolIf you want to install the tool on your (build) computer, the package is available via Chocolatey. To install, use the following command:
Using GitLink via the command line is very simple:
Running for a custom raw content URLWhen working with a content proxy or an alternative git VCS system that supports direct HTTP access to specific file revisions use the
The custom url will be used to fill in the following pattern When working with a repository using uncommon URL you can use placeholders to specify where the filename and revision hash should be, use
Or if you require URL encoded filename you can use
The custom url will be used to fill the placeholders with the relative file path and the revision hash. Git repository locationGitLink resolves the git repository based on the location of the pdb file. If the pdb file is located outside of the git repository, use the Native PDBsNative PDBs (from C++ projects) are supported by using -a option:
All known C++ source files from your git depot will be indexed in the PDB. More optionsThere are many more parameters you can use. Display the usage doc with the following command line:
How does it workThe SrcSrv tool (Srcsrv.dll) enables a client to retrieve the exact version of the source files that were used to build an application. Because the source code for a module can change between versions and over the course of years, it is important to look at the source code as it existed when the version of the module in question was built. For more information, see the official documentation of SrcSrv. GitLink creates a source index file and updates the PDB file so it will retrieve the files from the Git host file handler. To do this, GitLink must be aware of the public URL from which the source files you compiled with can be retrieved. GitLink.exe reads your compiler-generated PDB, which already contains full paths to your local source files. It then searches for a git repo that contains those source files and looks up the commit that HEAD points to. It also searches your remotes for a URL pattern that it recognizes (e.g. https://github.com/name/repo). It combines the URL and the commit ID to create a unique URL for each source file of this exact version, and adds this information to your PDB. When you share your PDB alongside your assembly, your users who debug with Source Server support enabled will automatically be able to step into your source code. TroubleshootingSource Stepping isn't working
Source Stepping returns HTMLIf your repository is private, you are likely seeing the logon HTML from your git host.
Note that this approach is not guaranteed to work. Visual Studio needs to authenticate to retrieve the source files but does not ask the user for credentials to do so. There are ways to work around this, but no mechanism is currently provided out-of-the-box in GitLink. Possible workarounds
Supported git providersGitLink supports the following providers out of the box (will auto-detect based on the url):
Providers that could be supported with the help of the community: It is also possible to specify a custom url provider. Projects using GitLinkBelow is a list of projects already using GitLink (alphabetically ordered).
Are you using GitLink in your projects? Let us know and we will add your project to the list. Note that you can also create a pull request on this document and add it yourself. IconLink by Dominic Whittle from The Noun Project |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论