I installed the latest llvm on Windows with Visual Studio 2015.
I created a C++ project and choose LLVM-vs2014 as the platform toolset in VS 2015.
I can compile and the compiler output as follows:
------ Rebuild All started: Project: Cxx1zTest, Configuration: Debug x64 ------ 1> Cxx1zTest.vcxproj -> D:\projects\Cxx1zTest\x64\Debug\Cxx1zTest.exe 1> Cxx1zTest.vcxproj -> D:\projects\Cxx1zTest\x64\Debug\Cxx1zTest.pdb (Full PDB) ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
I can also run the project successfully.
The issue is:
I cannot debug the project in source-level as VC++ does; though the full pdb is generated.
After I press F5 to start debug, the debug window outputs:
'Cxx1zTest.exe' (Win32): Loaded 'D:\projects\QbgTestServer\x64\Debug\Cxx1zTest.exe'. Symbols loaded. 'Cxx1zTest.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file. 'Cxx1zTest.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file. 'Cxx1zTest.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file. 'Cxx1zTest.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'. Cannot find or open the PDB file. 'Cxx1zTest.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'. Cannot find or open the PDB file. 'Cxx1zTest.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. Cannot find or open the PDB file. 'Cxx1zTest.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. Cannot find or open the PDB file. 'Cxx1zTest.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file. 'Cxx1zTest.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file. The thread 0x16ec has exited with code 0 (0x0). The thread 0x115dc has exited with code 0 (0x0). The thread 0x9740 has exited with code 0 (0x0). The program '[1108] Cxx1zTest.exe' has exited with code 0 (0x0).
What's the root cause?
Is there a workaround to fix the issue?
D:\projects\Cxx1zTest\x64\Debug\Cxx1zTest.pdb
vs.D:\projects\QbgTestServer\x64\Debug\Cxx1zTest.exe
. Make sure you have the symbol directories set up correctly. β antipattern