none
Compile error: Cannot find or open the PDB file

    Question

  • I'm trying to debug my code, but when I run it, the command prompt pops up and promptly disappears, then I get the following error in my "Output":

    'Blossom.exe': Loaded 'C:\Users\Arman\Documents\Visual Studio 2010\Projects\Blossom\Debug\Blossom.exe', Symbols loaded.
    'Blossom.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
    'Blossom.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
    'Blossom.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file
    'Blossom.exe': Loaded 'C:\Windows\System32\msvcp100d.dll', Symbols loaded.
    'Blossom.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
    First-chance exception at 0x7494d36f in Blossom.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
    Unhandled exception at 0x7494d36f in Blossom.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..


    I'm not worried about the exceptions (those are presumably thrown by my code), but rather the "Cannot find or open" errors. This question does seem to have been answered here: http://social.msdn.microsoft.com/Forums/uk/vsdebug/thread/f2d31010-dc89-4290-8869-11bf4a037ea0

    but I don't really understand the answer; is this a "problem" or just something I can ignore? Can I stop the errors from appearing?

    Thursday, December 22, 2011 2:19 AM

Answers

  • Hi arman_sch,

    Thanks for your post in the MSDN Forum.

    As far as I know, the PDB file is a file with debug information. The fact that it is missing is no problem unless you need the debug information (line number, local variable names and so on ). This is because a program database (PDB) file holds debugging and project state information that allows incremental linking of a debug configuration of your program. 

    These messages mean that you don't have symbols installed for the system libraries. This isn't a problem, you can still debug your own code. When the project is compiled, a matching PDB file will be created.

    I hope this reply is helpful to you.
    Best regards,


    Helen Zhao [MSFT]
    MSDN Community Support | Feedback to us
    Friday, December 23, 2011 6:39 AM

All replies

  • The messages just mean that your code loaded the listed dlls, but Visual Studio couldn't find the debug information/source code.  As those DLLs are simply core Windows DLLs, that is to be expected.  Normally I just ignore them.  You can get the symbols to the system files if you want (you won't get the actual source, but it can help for call stack walking if you break in system code or have system code below you when you break).

     

    • Proposed as answer by Helen Zhao Thursday, December 29, 2011 7:52 AM
    Thursday, December 22, 2011 2:28 AM
  • >I'm not worried about the exceptions (those are presumably
    >thrown by my code), but rather the "Cannot find or open"
    >errors. Can I stop the errors from appearing?

    Where do you see the word "error" in those messages?

    They are status reports only, and normal. After all,
    you don't really have a program data base file for the
    Windows kernel, etc. do you?

    The exception(s) need to be fixed. Ignore the others.

    - Wayne

    Thursday, December 22, 2011 2:30 AM
  • Hi arman_sch,

    Thanks for your post in the MSDN Forum.

    As far as I know, the PDB file is a file with debug information. The fact that it is missing is no problem unless you need the debug information (line number, local variable names and so on ). This is because a program database (PDB) file holds debugging and project state information that allows incremental linking of a debug configuration of your program. 

    These messages mean that you don't have symbols installed for the system libraries. This isn't a problem, you can still debug your own code. When the project is compiled, a matching PDB file will be created.

    I hope this reply is helpful to you.
    Best regards,


    Helen Zhao [MSFT]
    MSDN Community Support | Feedback to us
    Friday, December 23, 2011 6:39 AM