我正在尝试使用 git 设置 Microsoft 符号服务器。我四处寻找,发现了这个
https://github.com/joliver/SourceServer-GitExtensions
我遵循了说明的每一步。
当我尝试调试时,我从 Visual Studio 弹出窗口
gitcontents.bat "git@github.com:Myconpany/Myproject.git (fetch)" "C:\Users\myusername\AppData\Local\SOURCE~1\bfef70fcb1efef501a09d451517a24f049383e28\.localRepo" 04898e9268d374a9a503e4c138b27f01b7553a3e "C:\Users\myusername\AppData\Local\SOURCE~1\bfef70fcb1efef501a09d451517a24f049383e28\04898e9268d374a9a503e4c138b27f01b7553a3e\codetest.cs"
我运行了我得到这个错误的命令
fatal: bad object 04898e9268d374a9a503e4c138b27f01b7553a3e
不知道出了什么问题。那是因为我有多个分支,我是否必须指定我想在那里获取的特定分支?
这是我用来生成索引的命令
gitindex.cmd -debug -source=<sourcedir> -symbols=<pdb file dir>
我试图对我的 pdb (SymbolServerTests.pdb) 文件运行这些命令
Srctool.exe SymbolServerTests.pdb
[C:\data\Myrpoject\SymbolServerTests\SymbolServerTests\CodeTest.cs] cmd: gitcontents.bat "git@github.com:Myconpany/Myproject.git (fetch)" "C:\data\Myproject\bfef70fcb1efef501a09d451517a24f049383e28\.localRepo" 04898e9268d374a9a503e4c138b27f01b7553ae3 "C:\data\Myproject\bfef70fcb1efef501a0
9d451517a24f049383e28\04898e9268d374a9a503e4c138b27f01b7553a3e\codetest.cs"
SymbolServerTests.pdb: 1 source files are indexed
pdbstr -r -p:SymbolServerTests.pdb -s:srcsrv
SRCSRV: ini ------------------------------------------------
VERSION=1
INDEXVERSION=2
VERCTRL=Git
DATETIME=Thu Jan 26 10:53:05 2012
SRCSRV: variables ------------------------------------------
GIT_REPO_ID=bfef70fcb1efef501a09d451517a24f049383e28
GIT_ORIGIN_NODE=git@github.com:Mycompany/Myproject.git (fetch)
GIT_EXTRACT_TARGET=%targ%\%GIT_REPO_ID%\%var2%\%fnfile%(%var1%)
GIT_EXTRACT_CMD=gitcontents.bat "%GIT_ORIGIN_NODE%" "%targ%\%GIT_REPO_ID%\.localRepo" %var2% "%git_extract_target%"
SRCSRVTRG=%GIT_extract_target%
SRCSRVCMD=%GIT_extract_cmd%
SRCSRV: source files ---------------------------------------
c:\data\myproject\symbolservertests\symbolservertests\codetest.cs*04898e9268d374a9a503e4c138b27f01b7553a3e
SRCSRV: end ------------------------------------------------
更新:我想我得到了一些改进。我已将文件签出到此位置。
C:\Users\myusername\AppData\Local\SOURCE~1\bfef70fcb1efef501a09d451517a24f049383e28\04898e9268d374a9a503e4c138b27f01b7553a3e\codetest.cs
但我得到了
Determining whether the checksum matches for the following locations: 1: C:\Users\myusername\AppData\Local\SOURCE~1\bfef70fcb1efef501a09d451517a24f049383e82\26348c09499b843558a4cc676c0d17a83327d56e\codetest.cs Checksum: MD5 {60 d6 36 20 c3 af c8 31 eb 32 50 3f 27 6b 2f d8}校验和不匹配。
pdb 中的校验和是在哪里计算的?