我自己在调试模式下的二进制文件“二进制文件不是用调试信息构建的" [英] My own binary in debug mode "Binary was not built with debug information"

查看:39
本文介绍了我自己在调试模式下的二进制文件“二进制文件不是用调试信息构建的"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm using Visual Studio 2017 Version 15.9.6 on Win10

当我尝试使用断点调试我的应用程序时,我看到不会命中断点.没有为此文档加载任何符号.".我检查了 Debug > Windows > Modules,发现二进制文件不是用调试信息构建的.".这仅适用于我的应用程序,所有引用和系统 DLL 都已加载.

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.

我已确保调试信息"设置为完整.我试过删除我的 Bin 和 Obj 文件夹并重建.我的个人资料设置为调试".

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();
        }

我还注意到正在制作 PDB 文件,即使在删除/重建之后也是如此.

I've also noticed that the PDB file is being made, even after deleting/rebuilding.

谢谢!

推荐答案

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

The problem seems to be with the Assembly Name.

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

It contains whitespace, meaning for some reason the PDB wouldn't load. Removing whitespace solved the problem.

这篇关于我自己在调试模式下的二进制文件“二进制文件不是用调试信息构建的"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆