问题
I'm using Visual Studio 2017 Version 15.9.6 on Win10
When I try to debug my application with break points, I see "The breakpoint will not be hit. No symbols have been loaded for this document.". I checked Debug > Windows > Modules and found "Binary was not built with debug information.". This is only the case for my application, all references and system DLL's are loaded.
I have ensured "Debug Info" is set to Full. I have tried deleting my Bin and Obj folder and rebuilding. My profile is set to "Debug"".
Just in case this might be my code, I tried this and "Symbol File Not Loaded":
static void Main(string[] args)
{
Debugger.Break();
}
I've also noticed that the PDB file is being made, even after deleting/rebuilding.
Thanks!
回答1:
The problem seems to be with the Assembly Name.
It contains whitespace, meaning for some reason the PDB wouldn't load. Removing whitespace solved the problem.
来源:https://stackoverflow.com/questions/57637134/my-own-binary-in-debug-mode-binary-was-not-built-with-debug-information