PDB files

  • Thread starter Thread starter Frank Rizzo
  • Start date Start date
F

Frank Rizzo

As I understand it, having PDB files enables the runtime report the line
numbers where the errors actually occured. So my question is why
wouldn't you distribute PDB files with your application?

Thanks.
 

Be careful. JayBaz says:

"Set with 'csc /debug[+|-]'. "

then he says:

"Turning on generation of .pdb files doesn't affect the generated code.
It's orthogonal to the optimization flags. "

The second statement is true, but only for /debug:pdbonly, it is NOT
true for /debug or /debug+. All versions of /debug (except /debug-, of
course) generate pdb files. The reason is that /debug adds the
[Debuggable] attribute to the assembly which switches off runtime
optimizations and switches on object tracking:

http://msdn.microsoft.com/library/e...sdebuggableattributeclasstopic.asp?frame=true

/debug:pdbonly will only generate pdb files and will NOT add
[Debuggable]

Note that deploying pdbs with an assembly means that the exception stack
is richer, but the stack may not be correct because runtime
optimizations may inline code. Of course you can switch that off (the
[Debuggable] attribute, and there's an ini file that can do it too) but
then you will affect your application's performance again.

I really don't like the idea of using customers as testers (which is
suggested if you deploy pdbs), that's the work that your QA department
should do. However, I do understand that if you get a bug report from a
customer you will want to determine what the issue is and fix it. You
have to decide your own policy.
http://groups.google.com/group/microsoft.public.windbg/msg/fcf87c9799217d71.
Performance is no issue if you want to use the command line ;-)

Indeed. Managed C++ added this feature in 1.1 as well.

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top