Questions tagged [pdb-files]

This PDB is Microsoft's "Program Database" format for debugging symbols, stored in files with a `.pdb` extension.

These are a kind of debugging symbols; you need them to get decent stack traces of MSVC-compiled native programs on Windows, but on .NET they are only really needed for source locations, so that the debugger can find the lines of source code that correspond with each part of the compiled code.

See also the program database article on Wikipedia.

If you want to use information from PDB files in a program, you could use either DbgHelp, a C-level API, or DIA, a COM API w/ .NET bindings.

This tag was split from , which is supposed to be empty now, but might have new questions where the asker didn't know what PDB was relevant (so it would be good to move them here when this is the one).

See also:

646 questions
32
votes
5 answers

Generate PDB from .NET DLL file?

I need something that can generate a PDB from a DLL file (C# .NET code), is there any free program to do that?
BrunoLM
  • 97,872
  • 84
  • 296
  • 452
31
votes
4 answers

How can I include line numbers in a stack trace without a pdb?

We are currently distributing a WinForms app without .pdb files to conserve space on client machines and download bandwidth. When we get stack traces, we are getting method names but not line numbers. Is there any way to get the line numbers…
JoelFan
  • 37,465
  • 35
  • 132
  • 205
28
votes
1 answer

How can I get Visual Studio to use Embedded Source code whilst debugging?

I have embedded the C# source code into a portable PDB file using the element in the csproj file, and I have embedded the pdb into the assembly using the embedded as described in Embedding C# sources in PDB…
Daniel James Bryars
  • 4,429
  • 3
  • 39
  • 57
27
votes
7 answers

Are there any security issues leaving the PDB debug files on the live servers?

Are there any security issues keeping the .NET PDB files on the real server? I know that throwing exceptions might take a bit longer , but who throws exceptions during normal execution anyway? :-) But from a security perspective? any issues?
Tore Nestenius
  • 16,431
  • 5
  • 30
  • 40
26
votes
3 answers

"Browse To Find Source" in Visual Studio 2010

When is "Browse To Find source" enabled in Visual Studio 2010? (see below) In addition, I want to have it enabled so that I could browse to already-downloaded source code files from http://referencesource.microsoft.com/. This would be useful since…
Liviu Trifoi
  • 2,980
  • 1
  • 21
  • 28
25
votes
4 answers

How do I change the locations of source files in a symbols file (pdb)

Basically what I want to do it this: a pdb file contains a location of source files (e.g. C:\dev\proj1\helloworld.cs). Is it possible to modify that pdb file so that it contains a different location (e.g.…
Sir Rippov the Maple
  • 7,491
  • 5
  • 42
  • 52
24
votes
0 answers

what's the difference between C# compilation setting "/debug:pdbonly" and "/debug:full"?

According to msdn http://msdn.microsoft.com/en-us/library/8cw0bt21.aspx , both compilation setting "/debug:pdbonly" and "/debug:full" will make .pdb (Program Database) files be generated. However, what is the difference? The page says: "One…
athos
  • 6,120
  • 5
  • 51
  • 95
23
votes
4 answers

Debugging a release version of a DLL (with PDB file)

If I have a DLL (that was built in release-mode) and the corresponding PDB file, is it possible to debug (step-into) classes/methods contained in that DLL? If so, what are the required steps/configuration (e.g. where to put the PDB file)? Edit: If…
M4N
  • 94,805
  • 45
  • 217
  • 260
22
votes
1 answer

How to load symbols in Visual Studio 2012

When I am debugging my app I see messages: cannot find or open the PDB file I seem to remember being able to specify the location of the PDB file while debugging the app. How can I do this? I'm using Visual Studio 2012.
john d
  • 259
  • 1
  • 2
  • 8
22
votes
5 answers

What's a PDB file?

What's the PDB files inside the .NET dll files and what it does? Usually peoples remove this file in deploying and only keep the dll file in lib folders but it seems nothing happened and everything works well...
Afshin Mehrabani
  • 33,262
  • 29
  • 136
  • 201
21
votes
5 answers

How much information do pdb files contain? (C# / .NET)

Is it wise to redistribute the pdb files along with a commercial application? Occasionally, I'm using the stack trace to get a more detailed error reporting logs from the deployed applications; can this functionality be achieved without relying to…
Silver Dragon
  • 5,480
  • 6
  • 41
  • 73
21
votes
5 answers

"PDB does not match image" error in C# VS2010 project

I've been using a library in my code base for a while now, and I wanted to debug right into the library level. To do that, I downloaded the source code and included the project as an existing project into my C# solution. I then had my other…
Chris
  • 4,663
  • 5
  • 24
  • 33
21
votes
1 answer

How does Visual Studio know if the source file matches the original version?

I figured out how a .NET assembly .dll file maps to a .pdb using a GUID (blog). When I debug into an assembly and it asks for the source code, if I navigate to a file, it may tell me that the source code is different from the original. How does it…
Cameron Taggart
  • 5,771
  • 4
  • 45
  • 70
20
votes
1 answer

Compiler PDB file and the Linker PDB file

I am getting confused as to what is the difference between the compiler and linker PDB files respectively (i.e. in Visual Studio, Project Properties > C/C++ > Output Files > Program Database File Name vs Project Properties > Linker > Debugging). I…
Samaursa
  • 16,527
  • 21
  • 89
  • 160
20
votes
1 answer

In Visual Studio, can I put breakpoints in code for which I only have debugging symbols?

Since I do not have access to the complete source code of a library I'm using, but I do have the pdb files, is it possible to set a breakpoint in the "debugging source code"? If so, how would I do that?
sebastiaan
  • 5,870
  • 5
  • 38
  • 68
1
2
3
42 43