I am using Visual Studio 2013, .Net Framework 4.0, and C#.
I am trying to debug a file in my project. I have the project set to debug build in the project properties
If you're trying to debug native code (C++) from managed code (C#), make sure that your properties are set to Mixed instead of Native only.
(I followed the answer given here by Weston. Thanks Weston!)
The dll you are trying to debug most probably is not being built in your solution. You need to locate where it is being built and obtain a debug version (or at least a release version with the pdb
symbol file).
For Visual Studio 2017 for Configuration Release or Debug you can create a pdb file for debug information like this:
If you're having this problem and none of the other answers here worked, check solution -> Properties-> Configuration and make sure that your project is set to debug.
If your project is already in Debug mode. Please check Advanced Build Settings Dialog Box in Build tab of project.
Make sure that Debug Info is not set to none Reference:
Stackoverflow
MSDN