Cannot Find Or Open The Pdb File

0916

When starting a program under the Microsoft Visual Studio. debugger, you will generally see in the Output pane a series of messages similar to the following. After I try to run this code it gives me these lines on the output and I don't know what I should do to fix it. I made sure there was a.txt file so the. Jan 10, 2018  Dear All, Code runs OK in debug mode, when application stops. There are a lot of messages 'Cannot find or open the PDB file.' On Output Window. What does it mean and how to fix it? Thanks and regards, E-John It is quite normal that the debugger does not find symbols for system dlls. If you look carefully at the messages you can see that it did find.

  1. Could Not Find Or Open Pdb File
  2. Cannot Find Or Open The Pdb File
  3. Cannot Find Or Open The Pdb File In C++

Could Not Find Or Open Pdb File

Cannot

Related Articles

  • 1 Resume a Project on Visual Basic
  • 2 Add a File to a Cabinet File
  • 3 Run APK Files on an Android SDK
  • 4 Execute a Servlet in Netbeans

In Visual C++ and other Microsoft languages, the Program Database file, stored with the extension .pdb, holds information used by the linker and debugger. Depending on compiler and linker options, there can be several .pdb files, each used at different times during the build and debug processes of your project. If these files mysteriously disappear, there are several ways to recreate them.

Background

Microsoft’s Visual Studio languages create .pdb files as part of the compile and link processes. These files contain pointers to references and symbols, allowing the linker and debugger to find code and variables in the object and executable files. In Visual C++, at least two .pdb files get created during the build process. The file vc100.pdb in Visual Studio 2010 gets built during the compile phase and contains pointers to the various object files. A second file, projectName.pdb, (where project name is the name of the project or executable file) contains pointers and references to the executable file. These files can be found in the “Debug” folder in the project directory.

Clean and Rebuild

The most common way to lose the pdb files occurs when “Project” then “Clean” menu items gets clicked in the Visual Studio IDE. The clean operation removes all object, linker and executable files, including the pdb files. To recreate the files, simply click “Project” and choose “Rebuild All.”

Check Project Options

If clean and rebuild does not work, there may be project options that were changed along the way or the project may have been corrupted. The most common of these is to change the project configuration from Debug to Release. To change back to Debug, click “Project,” select “Configuration Manager” and choose “Debug.” If the configuration manager option does not appear in the build menu, click “Tools” and select “Options.” When the Options page appears, choose “Projects and Solutions” from the tree view and click the check box labeled “Show Advanced Configuration Options.” The configuration manager should appear in the build menu.

Cannot Find Or Open The Pdb File

Recreate the Project

If the files still do not appear, it may be time to recreate the project. Close Visual Studio, rename the project folder and re-open Visual Studio. Click “File,” select “New Project” and set up a new Visual C++ project using the same name and project type as before. Build the new empty project to create the basic program structure and files, and copy the .cpp, .h, .res and other files from the original project. Do not overwrite any files in the new project folder.

Go back to Visual studio and click “Project,” select “Add Existing Files” and choose all of the files that were copied into the project from the old folder. Build and test the program to ensure that all necessary files were copied. Again, switch the configuration to 'debug' and run the project. The .pdb files should be in the debug folder.

References (1)

About the Author

Cannot Find Or Open The Pdb File In C++

Rick Leander lives in the Denver area and has written about software development since 1998. He is the author of “Building Application Servers” and is co-author of “Professional J2EE EAI.' Leander is a professional software developer and has a Masters of Arts in computer information systems from Webster University.

Cite this Article
Choose Citation Style
Leander, Rick. 'I Cannot Find or Open the PDB File in C++.' Small Business - Chron.com, http://smallbusiness.chron.com/cannot-open-pdb-file-c-41666.html. Accessed 07 July 2019.
Leander, Rick. (n.d.). I Cannot Find or Open the PDB File in C++. Small Business - Chron.com. Retrieved from http://smallbusiness.chron.com/cannot-open-pdb-file-c-41666.html
Leander, Rick. 'I Cannot Find or Open the PDB File in C++' accessed July 07, 2019. http://smallbusiness.chron.com/cannot-open-pdb-file-c-41666.html
Note: Depending on which text editor you're pasting into, you might have to add the italics to the site name.
This entry was posted on 16.09.2019.