修复“断点当前不会受到打击。没有为此文档加载符号。“ [英] Fixing "The breakpoint will not currently be hit. No symbols have been loaded for this document."

查看:124
本文介绍了修复“断点当前不会受到打击。没有为此文档加载符号。“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C#桌面应用程序。



我尝试过以下操作。




  • 确保在所有程序集上设置调试配置,调试标志和完整的调试信息。

  • 从整个机器中删除与项目相关的所有bin和obj文件夹以及所有DLL。 li>
  • 从头开始重新创建导致问题的项目。

  • 重启。



我在解决方案中有两个WinForms项目。其中一个加载调试信息,一个不。他们都指的是我试图在项目文件中以完全相同的方式获取调试信息的程序集。任何想法?






我想在这里添加,主要是为了自己回来审查这个问题,符号在加载程序集之前不会加载,并且在需要之前装入程序不会被加载。如果断点位于仅在主程序集中的一个函数中使用的库中,则不会加载该符号(并且将在断开该函数之前将该断点显示为未被击中)。

解决方案

在调试/常规设置中禁用Just My Code选项。


C# desktop application on express edition. Worked then didn't work 5 seconds later.

I tried the following.

  • Ensure debug configuration, debug flag, and full debug info are set on all assemblies.
  • Delete all bin and obj folders and all DLLs related to the project from my entire machine.
  • Recreate projects causing the problem from scratch.
  • Reboot.

I have two WinForms projects in the solution. One of them loads the debug info, one doesn't. They both refer to the assembly I'm trying to get debug info on in exactly the same way in the project file. Any ideas?


I want to add in here, mostly for myself when I come back to review this question, that symbols are not loaded until the assembly is loaded, and the assembly is not loaded until it is needed. If the breakpoint is in a library that is only used in one function in your main assembly, the symbols will not be loaded (and it will show the breakpoint as not being hit) until that function is called.

解决方案

Disable the "Just My Code" option in the Debug/General settings.

这篇关于修复“断点当前不会受到打击。没有为此文档加载符号。“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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