I have a source indexed PDB, but Visual Studio does not attempt to download the appropriate source when debugging (verified using Fiddler), even though it does create the proper directory structure in the symbol cache (i.e. under the src/ subdirectory). To troubleshoot the issue I used srctool.exe:
srctool -x myfile.pdb
However, this just causes the URLs to be listed; it does not try to download them:
https://myurl.com/bitbucket/projects/BLAH/repos/MyRepo/browse/Src/SomeDir/SomeFile.cs?at=05bff5155beece6c7e6acde97f7aeefc7b65e2cf&raw
...
myfile.pdb: 20 source files were extracted.
The output of pdbstr is the following:
SRCSRV: ini ------------------------------------------------
VERSION=2
SRCSRV: variables ------------------------------------------
RAWURL=https://myurl.com/bitbucket/projects/BLAH/repos/MyRepo/browse/%var2%?at=05bff5155beece6c7e6acde97f7aeefc7b65e2cf&raw
SRCSRVVERCTRL=https
SRCSRVTRG=%RAWURL%
SRCSRV: source files ---------------------------------------
E:\AnotherDir\work\9f49bd3ba978a6f5\Main\Src\SomeDir\SomeFile*Src/SomeDir/SomeFile
...
SRCSRV: end ------------------------------------------------
If anyone could point me in the right direction to figure out what is going on, I would greatly appreciate it.
SRCSRV doesn't work with query URLs (see this issue and this issue).
If you're using a public Bitbucket repository, you can use a pattern like this acceptance test; that is,
I'm not sure if private Bitbucket installs support this kind of syntax, though. Check out this issue for more info - from my brief reading, it appears that they support raw files without query strings, but it's not clear whether you can specify the commit hash without a query string.
From comments on the other issues, it looks like a common workaround (for private Bitbucket installs) is to set up url rewriting or a small passthrough web service that can take SRCSRV-friendly URLs.
Regarding
srctool, I believe its output is a bit misleading but technically correct. It does behave the same for correctly-source-indexed PDBs that VS can download.PDBs mapped this way specify
SRCSRVTRG(the target) but notSRCSRVCMD(the download command). SRCSRV is supposed to check the target and - if the file is not there - it will execute the download command:In this case, the targets are the actual HTTPS URLs. Technically, the file is already "at" that location, so SRCSRV just returns the file location, and
srctoolreports that it's already there (with a misleading "extracted" message).When VS does actually download the file, it will store it locally under its symbols cache, but that is a further step in this process; storing it there is not strictly necessary.