我自己的二进制文件处于调试模式 "Binary was not built with debug information"

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

我在 Win10 上使用 Visual Studio 2017 版本 15.9.6

当我尝试使用断点调试我的应用程序时,我看到 "The breakpoint will not be hit. No symbols have been loaded for this document."。 我检查了 Debug > Windows > Modules 并找到了 "Binary was not built with debug information."。这只是我的应用程序的情况,所有引用和系统 DLL 都已加载。

我已确保 "Debug Info" 设置为完整。 我试过删除我的 Bin 和 Obj 文件夹并重建。 我的配置文件设置为 "Debug"".

以防万一这可能是我的代码,我试过了 "Symbol File Not Loaded":

        static void Main(string[] args)
        {
            Debugger.Break();
        }

我还注意到正在制作 PDB 文件,甚至在 deleting/rebuilding 之后也是如此。

谢谢!

问题似乎出在程序集名称上。

它包含空格,意味着由于某种原因 PDB 无法加载。删除空格解决了这个问题。