4
votes

I have a project in Visual C++ 2010 (Win32 application, non-managed code) in which I'm experiencing a really strange behavior. I put a breakpoint and it simply does not break!

The clues:

  • A PDB file is generated in the exe file path.

  • The Debug/Modules window shows the message "Binary was not built with debug information.".

  • Loading the PDB file manually (Debug/Modules, right click on the executable module, Load Symbols From/Symbols Path then double click on the PDB file) says "A matching symbol file was not found on this folder.".

My settings:

  • C++/General/Debug Information Format: Program Database.
  • C++/Optimization: Disabled.
  • C++/Code generation/Runtime library: Multi-threaded Debug.
  • Linker/Debugging/Generate Debug Info: Yes.
  • Linker/Debugging/Generate program database: $(TargetDir)$(TargetName).pdb.

Compiler command line:

/I"..\..\calibur64k\include" /I"C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include" /Zi /nologo /W3 /WX- /Od /Oy- /D "D3D_DEBUG_INFO" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fp"Debug\calibur_app.pch" /Fa"Debug\" /Fo"Debug\" /Fd"Debug\vc100.pdb" /Gd /analyze- /Zl /errorReport:queue 

Linker command line:

/OUT:"C:\Users\David\Desktop\calibur64k\vs2010\Debug\calibur_app.exe" /INCREMENTAL:NO /NOLOGO "kernel32.lib" "user32.lib" "d3dcompiler.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" "C:\Users\David\Desktop\calibur64k\vs2010\Debug\calibur64k.lib" /MANIFEST /ManifestFile:"Debug\calibur_app.exe.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Users\David\Desktop\calibur64k\vs2010\Debug\calibur_app.pdb" /ASSEMBLYDEBUG /SUBSYSTEM:WINDOWS /PGD:"C:\Users\David\Desktop\calibur64k\vs2010\Debug\calibur_app.pgd" /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE

Nothing I've found on the Internet helped me :( Any ideas guys? Thanks!

2
Try cleaning everything (by deleting the output files, not by the 'Clean' command) and the building again. - Yakov Galka
@ybungalobill Tried lots of time, but does not work :( - davidcm

2 Answers

3
votes

The problem has been solved by trial and error :)

For anyone could be interested in:

Linker/Manifest File/Generate Manifest: set it to No. Linker/Manifest File/Allow Isolation: set it to No. Linker/Embedded IDL/Ignore embedded IDL: set it to Yes.

That's it. Maybe the generated PDB file manifest or the executable manifest were wrongly setup for a C++ project?

Thanks for your answers.

3
votes

My Settings of Visual c++ 2010:

Linker/Manifest File/Generate Manifest: Yes. Linker/Manifest File/Allow Isolation: Yes. Linker/Embedded IDL/Ignore embedded IDL: No.

I have used these settings in all of my programs and break points are successfully hit.

So, my inference is that what you have proposed might not be the right solution.