Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating Symbols in release binaries with Visual Studio

Update: I posted a comment on John Robbins blog about the. He wrote a response here:

http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/06/19/do-pdb-files-affect-performance.aspx

The project I am working on does not build symbols for its release binaries, and I would like to change this.

Some info:

  • Mostly C++ code base, some C#.
  • Compiled under VS2k5, will be moving to VS2k8 Team System.
  • Time critical software.
  • Must have optimizations enabled.
  • Source code is provided to customer so full symbols are fine.

What are the best command line switches to generate what I need, and what, if any, performance hits am I going to take?

Also, are there any "Gotchas" to be aware of?

like image 257
Justin Avatar asked May 14 '09 20:05

Justin


People also ask

How do I add debug symbols in Visual Studio?

From Visual Studio, select Tools > Options > Debugging. Select Symbols from the list, and then select the + sign to add a new Azure DevOps symbol server location.

Can we debug in Release mode in Visual Studio?

Visual Studio projects have separate release and debug configurations for your program. You build the debug version for debugging and the release version for the final release distribution. In debug configuration, your program compiles with full symbolic debug information and no optimization.


2 Answers

Generating debug symbols (ie PDB files) is just creating an external file that a debugger can reference when looking at your code in memory. It doesn't affect the code that the compiler or linker generate (sort of like generating a .MAP file).

Now if you're talking about defining _DEBUG in a release build, that's a whole different question.

like image 132
DougN Avatar answered Oct 07 '22 22:10

DougN


Update: I posted a comment on John Robbins blog about the. He wrote a response here:

http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/06/19/do-pdb-files-affect-performance.aspx

I found the following link on microsofts website: Generating and Deploying Debug Symbols with Microsoft Visual C++ 6.0

This link pertains to Visual C++ 6, but I am assuming these instructions are the same for Visual C++ 8(2005) and 9(2008).

The information it gives is very similar to the link provided by TheBlack but more in-depth.

like image 21
Justin Avatar answered Oct 07 '22 22:10

Justin