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

后端 未结 11 1581
悲&欢浪女
悲&欢浪女 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:14

    PDB files contain debug symbols that allow you to debug your binary even in release mode. You don't have to (and probably shouldn't deploy them), as they might be used to reverse engineer your application. Do keep them archived somewhere, though, because they come in very handy when you want to debug a crash dump.

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

    As the majority of the people on this thread have said: no, you don't have to ship the PDB file(s); but really you should if you ever intend to release the code into the wild.

    It's really about being able to support your application. Without the PDB, when you application crashes, all your user will be able to tell you is the raw memory address of where the application crashed; but with the PDB file you get an error you can actually do something about.

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

    No, you don't have to deploy the .pdb file.

    To quote from MSDN, "A PDB file is created when you build with /debug (Visual Basic/C#).", so it shouldn't be creating the debug database when compiling for release.

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

    No you do not need to deploy them.

    As to why they are even built in release. A PDB file really has a couple of uses but the primary ones (at least for me) are

    1. Debugging
    2. Profiling

    Both of these tasks are validly done on release binaries which is why release builds include a PDB. In fact, when debugging Watson dumps it's 100% of the time against a release build. Without a PDB I would have to resort to looking through dissasembly :(

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

    You don't need them to run.

    pdb files can be used to debug even if the build is on release configuration.

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

    Some tools like AVICode's InterceptStudio use the pdb files to view the source of a particular exception/stack trace/local from within the tool, rather than having to open up the source and go to a specific line.

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