We are thrilled to announce PDB Project on the VS Gallery Extension. PDB Project, as the name suggest, takes information contained in the .pdb to create a C++ project. Information includes all source files (.c, .cpp) used for building. It even includes sources from the libraries linked. Once created, the project will light up the IDE features. Intellisense, Find all Reference, Navigate To, etc. will work with the PDB project. In the current version of the tool, the produced project can’t build, so it won’t replace any existing build system.
The PDB Project is publicly available to install form Visual Studio Gallery. Once installed, a.pdb extension under File->Open->Project/Solution will be listed as a new supported project file format. Choose a PDB file and click open. A list of source files from the PDB will be displayed. Some files might be automatically resolved to the same location on the disk. In case some files are still unresolved, “Folder Mapping” dialog is used to provide other locations (ie. a remote location on a shared drive). When relevant files are resolved, click “Finish” and “Save”. The tool will load a newly created .vcxproj.
Watch the demo on Channel 9!
The PDB loader uses DIA SDK COM to extract the information from the PDB. This was easy to use after learning the structures and patterns. The sample included in the SDK is a good starting point.
The UI prompts for file/folder mapping. This part went through several iterations. First, adding the browse button and then adding the “Suggestions” field. Final iteration reduced the keyboard interaction and streamlined the workflow. If the pdb was built on the same machine, then just click “Finish” and “Save” without touching the keyboard. The default path to save the .vcxproj right next to the .pdb. If the .pdb was opened from the network where you might not have write access, it will default to the temporary folder instead.
The project creator uses MSBuild Construction Model to create the vcxproj. PDB project was initially coded to be used outside of the IDE, thus it couldn't leverage the Project System. As a side effect, the project file will differ slightly from a normal .vcxproj.
One major issue during development, we found Intellisense was about ~20 seconds slow per cpp file. On average, it should take no more than 2-3 seconds. With some investigation, we found that missing header files was causing the Intellisense to ignore using PCH. PCH skips for completeness because once a PCH is created, it only tracks the files used to construct it. Any missing files aren't tracked. When header file would appear later, the PCH would not trigger a refresh. To address slow load, PDB Project will detect missing header files and create a blank dummy file. This will let Intellisense to be fast even when dealing with incomplete projects.
No. Most VC users would not need this extension. It is targeted for advance users who have non-vcxproj based project system. Without a project, the IDE can't provide its reach of features. The PDB project will help bridge this gap.
If you use PDB Project, we would love your feedback. Feel free to post comments to this blog or email Felix or Balaji
Felix Huang (firstname.lastname@example.org) & Balaji Thumbavanam Kachapeswaran (email@example.com). and the VC++ team
Any chance we could get a version that's compatible with VS2013?
Something useful (for those few that do makes).
How do I get right of Sign In on the IDE? Policy somewhere?
@OK, use Microsoft account (Hotmail.com, Live.com, Outlook.com or register with any other domain with Live network). You will get 7GB on SkyDirve and lots of other wonderful stuff :)
PDB Project is superb! We have a large portable project that's built on Windows using the Visual Studio compiler but not via the standard build system. We've always used Visual Studio as our Windows debugger, and the addition of F12 and family to that environment is a real productivity boost. Big thanks!
Please add refactoring to Visual C++,
Bug Found: The extension will not open PDBs using capital letters .PDB
I have encountered a bug where the extension will not open PDBs using capital letters .PDB for the file extension. However, if I rename the PDBs to .pdb the extension opens the file without issue.
@Zach, Balaji and I are working on a VS2013 release.
Wow! Works great! We use MS compiler for Windows but our build system doesn't use project files so this looks like it will fill a big gap for us.
@Marcello -> Coming Soon... @DigitalSnow -> Bug fixed - Will not be there in the next version of the extension or the 2013 version that is coming very soon.
I find it really useful. It's great when guys are sharing such an important informations.
The PDBProject extension for Visual Studio 2013 downloaded here: visualstudiogallery.msdn.microsoft.com/271bc718-e668-4114-bb0b-4ac787192db0
How do I force it to re-scan the PDB files manually?
Does the new version that supports VS2013 have a refresh option to rescan the PDB files when they change?
Works great on projects that where build with makefiles.
Just build it, import the *.pdb and start using your regular project environment.
One idea to improve: works only with *.c and *.cpp files and not with *.asm files.
I had a big project (900 source files) with a number (50) of *.asm files.
The *.asm files where added by hand. Still a great time saver!!
@Rick - We are planning to release an update that informs the users about stale PDB when the user loads the PDB project. It will be available for 2012 and 2013 versions.