I have Visual Studio 2019 (app is Visual C++, unmanaged code, not .NET). I would like to generate a program database file (.PDB) even in release builds of my application. I don't plan to distribute the PDB file. But if I have one, and the application crashes, users can report the crash module and offset details (info available in the Event Viewer) and if I have the PDB file, I can use that to try and work out where the crash occurred and what caused it. I know it won't always help but sometimes it might. I have found that in order to generate a .PDB file, I have to set the compiler "Debug Information Format" to "Program Database (/Zi)". However, I don't want my release build to be negatively affected by my doing this. I propose to leave the release build optimisation at "Maximum Optimization (Favor Speed) (/O2)".
My question is: what are the implications of using the compiler's /Zi setting in a release build? Is there any reason I should be aware of, not to do it? Is it likely to affect the way that app runs? Will it be slower?