You must ensure that your application is built with debugging information.
Debugging information must be enabled for debug builds (the default) and for release builds (disabled by default).
To enable debugging information for a DLL/EXE:
•open the project settings/solution for that DLL/EXE
•select the build type (debug or release)
•modify the compiler settings to enable debugging information
e.g. Configuration Properties C/C++
General
Debug Information Format
e.g. Program Database (Zi)
•modify the linker settings to enable debugging information
e.g. Configuration Properties Linker
Debugging
Generate Debug Info
e.g. Yes (/DEBUG)
You must enable both compiler and linker settings to generate debugging information.
It is not possible to create an .exe or .dll that contains debug information. Debug information is always placed in a .pdb file.