Do you have to deploy the .pdb file with compiling

2019-01-31 16:41发布

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条回答
神经病院院长
2楼-- · 2019-01-31 17:04

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.

查看更多
Explosion°爆炸
3楼-- · 2019-01-31 17:08

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.

查看更多
女痞
4楼-- · 2019-01-31 17:10

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.

查看更多
虎瘦雄心在
5楼-- · 2019-01-31 17:12

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.

查看更多
聊天终结者
6楼-- · 2019-01-31 17:20

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.

查看更多
别忘想泡老子
7楼-- · 2019-01-31 17:23

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

查看更多
登录 后发表回答