Description
Problem
When cargo builds a target is passes -C extra-filename=-...
to rustc which produces an output file with a metadata suffix in the name. For windows targets this will produce foo-metadata.exe
and foo-metadata.pdb
files. It then copies and renames these files so the final result is foo.exe
and foo.pdb
.
However the debug data in a PE executable files stores the original name of the PDB file and this name is used when debuggers (Visual Studio, WinDbg or anything using dbghelp.dll) are searching for PDB files on symbol servers. So when looking for the PDB file for foo.exe, it will actually search for foo-metadata.pdb which has likely not been uploaded.
Possible Solution(s)
Ideally it would be possible to specify in the Cargo.toml
that extra-filename should not be used for certain profiles, e.g.:
[profile.release]
add-extra-filename = false
Notes
Output of cargo version
: cargo 1.33.0 (f099fe9 2019-02-12)