What are PDBs?
A Program Database (.pdb) file, also called a symbol file, maps the identifiers that you create in source files for classes, methods, and other code to the identifiers that are used in the compiled executables of your project.
The file also maps the statements in the source code to the execution instructions in the executables. The debugger will then use this information to determine the 2 key pieces of information:
You will often need .pdb files which contain symbols for Microsoft DLLs, or other 3rd Party libraries to debug a multitude of issues.
Ok, but why do I need them?
Taking an example, we run into scenarios on a daily basis wherein we need to inject a breakpoint in Microsoft code to capture memory dumps. To inject that breakpoint, we typically get a manual dump of the process, and use Debug Diagnostics, or the Visual Studio Debugger, to download them.
These debuggers will attempt to download all the symbols for libraries used within the application. This is a very time consuming process because it downloads PDBs for ALL libraries, while we need the PDB file for say, one specific library in which the breakpoint is to be injected. Not to mention the PDBs for all libraries in a process can get very large in size.
Why PDB Downloader?
PDB downloader downloads specific symbol files only for the libraries you want - reducing time, and space.
It is a small standalone executable (< 200KB) that just needs the DLL as an input.
Advantages
Cool, where do I get it from and how do I use it?
The tool can be downloaded from the open source github repo:
https://github.com/rajkumar-rangaraj/PDB-Downloader/releases/download/v1.0/PDBDownloader.exe
The GUI has a fairly simple layout with an option to input assembly file(s) using the file browser and enumerates them as a list (1).
Step 1
Click Open File(s), navigate to the folder containing the assembly and select the file
Step 2 (Optional Step)
You may modify the download path by clicking the “Saving to” link and selecting a folder of your choice. It will be a good idea to ensure that the folder you select has adequate NTFS permissions to write files.
Step 3
Clicking the start button probes the symbol server and downloads the .pdb file for your assembly.
And that’s all, you have your PDB downloaded!
Any pre-requisites?
OS: Windows Vista & above
.NET Framework : 4.5.2 & above
Note: You can always copy the library in question to a machine which fits the above requirements and use the tool there to download the symbols you need.
Using 3rd Party/Custom Symbol Server
If you want to use the PDB Downloader to download symbol files from 3rd Party symbol servers, all you need to do is create a simple configuration file named PDBDownloader.exe.config, and place it in the same folder as the tool, and add the below content:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="SymbolServer" value="http://symbols.mozilla.org/firefox"/> </appSettings> </configuration> |
The SymbolServer key here would be modified to reflect the URL of the symbol server you are targeting.
------------------------------------------------------------------------------------------------------------------------------------------
We are always interested to get feedback and know about any bugs that you may encounter when using the application, shoot an email to us using the Feedback/Bug link at the bottom of the tool and we’ll look into the problem (4).
------------------------------------------------------------------------------------------------------------------------------------------
Author: Pulkit Luthra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.