I'm using Visual Studio 2013 to write a C++ DLL, then EXCEL meant to load the DLL via VBA. After setting in Visual Studio Project Property -> Configuration Properties -> Debugging -> Command = C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE
, I started debug, then a dialog comes out:
Debugging information for 'Excel.exe' cannot be found or does not matach. Cannot find or open the PDB file. Do you want to continue debugging?
After I click yes, I notice VS is trying to download a lot of pdb
files and fail:
'EXCEL.EXE' (Win32): Loaded 'C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE'. Cannot find or open the PDB file.
'EXCEL.EXE' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'EXCEL.EXE' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'EXCEL.EXE' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'EXCEL.EXE' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'EXCEL.EXE' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'EXCEL.EXE' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'EXCEL.EXE' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'EXCEL.EXE' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'EXCEL.EXE' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
and etc, etc, though finally the debugging is OK.
Is such VS behavior OK? I just find it a bit weird, that to debug my DLL, need to download PDB files of EXCEL.EXE and NTDLL.DLL.
It seems there's a similar post here : How can I debug this error: 'Debugging information for iisexpress.exe cannot be found or does not match'? . But that one is a MVC project (mine is C++) and Visual Studio settings are different.
Cannot find or open the PDB file.
Generally this error is related to the symbol loaded. We need to enable the symbol Server under TOOLS->Option->Debugging->Symbols, and check the module window and make sure that all symbols are loaded successfully.