BhuttCrackSpackle

This is probably a deployment question, but there doesn't seem to be a deployment section in .NET Development Forum.

I thought the PDB file was only for debugging purposes, so why is there a PDB file in my bin\Release folder

What are the (dis)advantages of including this file in deployment




Re: Visual C# IDE Why is there a PDB file in my projects Release folder?

AndrewVos

Very interesting question. You should try google it, and see what you come up with. I myself don't include pdb's in production because of the extra space they take up.

Ahmedilyas






Re: Visual C# IDE Why is there a PDB file in my projects Release folder?

RizwanSharp

It started happen in Visual Studio 2005 only, In Visual Studio 2003 it did never happen so the thing you can see that in Visual Studio you could debug assemblies only in debug mode but in 2005 you can also debug when its set to Release.

Lets have more comments ;-)






Re: Visual C# IDE Why is there a PDB file in my projects Release folder?

MS Johan Stenberg

There is nothing magic with the release configuration that prevents it from generating pdb files. You were certainly able to do so in VS2003 as well, but if I'm not mistaken, it didn't do so by default (it's been a looong time since I used VS2003 - I've been using VS2005 for the last >3 years ).

Usually, the main difference between the debug configuration and the release configuration is that the debug configuration doesn't optimize the code, whereas the release configuration turns optimizations on. Debugging non-optimized code is usually easier, but some issues don't show in debug builds, so you have to dig into the optimized bits to figure out what the problem is.

I always generate pdbs when I build. There is no need to distribute 'em, but it makes life a whole lot easier if I get a crash dump sent my way and I need to debug it.

Best regards,
Johan Stenberg






Re: Visual C# IDE Why is there a PDB file in my projects Release folder?

Paul P Clement IV


If you want to eliminate the creation of the .PDB file select Project...<App> Properties...Compile Tab...Advanced Compile Options and under the Generate debug info drop-down select None.






Re: Visual C# IDE Why is there a PDB file in my projects Release folder?

Steve Greatrex

Hi,

I am actually trying to force my project (C#, VS2005 sp1) to generate PDB files in release mode, but despite many hours of googling and searching through options I cannot find anywhere describing how (or whether) this is possible!

Any help would be greatly appreciated!





Re: Visual C# IDE Why is there a PDB file in my projects Release folder?

nobugz

Project + properties, Build tab, Set Configuration to "Release", scroll down, Advanced button, set Debug output to "pdb-only". That's the default setting for any new VS2005 projects.





Re: Visual C# IDE Why is there a PDB file in my projects Release folder?

Steve Greatrex

Thanks!



Re: Visual C# IDE Why is there a PDB file in my projects Release folder?

Yewtaah

Would it not work to use the debug build (with .pdbs) to analyze the crash dump in your example I am still not convinced that there is a good reason to build .pdbs with a release build. Thanks for the very descriptive post, though





Re: Visual C# IDE Why is there a PDB file in my projects Release folder?

MSFT Johan Stenberg

Most likely not. For sure, if you have any conditional compilation, it would not. I would *never* release a version of my product without storing matching PDBs in a safe place (i.e. a symbol server).

Typically, I would not deploy the PDB file, however. If I need the symbols, I grab 'em from the symbol server...

Best regards,

Johan Stenberg