-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Describe the problem you are trying to solve
Whenever cargo build is run, it creates the files name+hash.exe and name+hash.pdb in the directory target/xxx/deps/. Then when the files are copied to target/xxx/, the .exe still references to the .pdb in the deps directory which also includes the hash in the name.
Then there are problems if the .pdb is distributed along the .exe. When someone tries to debug the program without the deps/ folder, the debugger doesn't find the symbols. I understand this is only a one-time issue per person (once they educate themselves on this behaviour) but it's not a good default.
Describe the solution you'd like
I tried looking up if there were previous discussions about it but couldn't find anything.
The only solution I could think of was creating the exe and pdb with the same name that should go into target/ and then copy them to deps/. I believe it's not a common practice to debug the files in deps/ so it shouldn't be an issue if the pdb link in that folder mismatches the name.
Notes