Do you have to deploy the .pdb file with compiling under release?

后端 未结 11 1582
悲&欢浪女
悲&欢浪女 2020-12-24 00:33

Do you have to deploy the .pdb file with compiling under release?

Why does it even compile a .pdb when you do a release build anyway?

相关标签:
11条回答
  • 2020-12-24 01:29

    No, you don't ship the .pdb files. They are generated because sometimes it's helpful to be able to debug a release build.

    0 讨论(0)
  • 2020-12-24 01:31

    If you want, you can also turn the PDB file generation off in the compile options.

    0 讨论(0)
  • 2020-12-24 01:32

    You don't have to deploy and distribute the PDB files along with your binaries.

    However, I suggest that you keep them (and eventually index them) to be able to analyze any dump files that clients, QA, and support people send you. This way, you will be able to have comprehensible stack traces and symbol information.

    0 讨论(0)
  • 2020-12-24 01:33

    Nope. You don't need to distribute them. It'll help with debugging (or I should say it will make debugging possible for sane people).

    You can also turn off or adjust the 'level' of symbols generated in Visual Studio -- just go to Project Properties / 'Build' tab / 'Advanced' -- and make adjustments to the 'Debug info' field.

    0 讨论(0)
  • 2020-12-24 01:35

    a PDB file contains information about names of functions. You need it to be able to get a stack trace. It can also contain information about mapping it to sources. Sometimes you might want to ship your release version, and still need to analyze a crash that occurs on the client side. For that, the PDB is needed. The PDB when compiling for release should in theory have less information than when compiling for debug.

    0 讨论(0)
提交回复
热议问题