我该如何补救“断点当前不会被击中”的问题。没有为该文档加载任何符号。警告? [英] How do I remedy the "The breakpoint will not currently be hit. No symbols have been loaded for this document." warning?

查看:90
本文介绍了我该如何补救“断点当前不会被击中”的问题。没有为该文档加载任何符号。警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

速成版上的C#桌面应用程序正常工作,然后在5秒钟后不工作。

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

我尝试了以下操作:


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

  • 删除所有bin和obj文件夹以及所有相关的DLL

  • 从头开始重新创建导致问题的项目。

  • 重新启动。

  • 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.

我在解决方案中有两个WinForms项目。其中一个加载调试信息,一个不加载。它们都引用我正试图以相同方式在项目文件中获取调试信息的程序集。有什么想法吗?

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 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.

推荐答案

首先尝试通过右键单击项目来重建项目,然后单击项目>重建
如果这行不通,请尝试清理项目(正确鼠标单击该项目>清理)

First try rebuilding your project by right mouse click the project > Rebuild If that doesn't work, try a clean of the project (right mouse click on the project > clean)

如果这不起作用,请检查以下内容:

If that didn't work check this:


  1. 右键单击您的项目

  2. 选择 [属性]

  3. 选择 [Build] 标签

  4. 确保 [定义DEBUG常量] [定义TRACE常量] 已选中

  5. 确保未选中 [优化代码]

  6. 单击 [高级] 按钮

  7. 确保 [Debug Info:] 设置为 [完整]

  8. 单击 [确定]并重建项目;-)

  1. Right mouse click your project
  2. Select [Properties]
  3. Select the [Build] tab
  4. Make sure [Define DEBUG constant] and [Define TRACE constant] are checked
  5. Make sure [Optimize Code] is unchecked
  6. Click the [Advanced] button at the bottom of the Build tabpage
  7. Make sure that [Debug Info:] is set to [full]
  8. Click [OK] and rebuild the project ;-)

(步骤6生成.pdb文件,这些是调试符号)

(step 6 generates the .pdb files, these are the debugging symbols)

这篇关于我该如何补救“断点当前不会被击中”的问题。没有为该文档加载任何符号。警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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