My own binary in debug mode “Binary was not built with debug information”

江枫思渺然 提交于 2021-02-10 18:48:41

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!