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

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

问题描述

速成版上的AC#桌面应用程序可以运行,但是5秒钟后却无法运行。

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

我尝试了以下操作:


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

  • 删除所有bin和obj文件夹以及与整个机器上与该项目相关的所有DLL文件。

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

  • 重新启动。

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

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

I have two Windows Forms projects in the solution. One of them loads the debug information, one doesn't. They both refer to the assembly I'm trying to get debug information 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.

推荐答案

检查您是否不在发行版中,而是在调试中。

Check if you are not in release but in Debug.

在调试时:

首先尝试通过右键单击项目>来重建项目。重建
如果不起作用,请尝试清理项目(在项目上单击鼠标右键> clean)

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. 确保 [定义调试常量] [Define TRACE constant] 已选中

  5. 确保未选中 [Optimize Code]

  6. 单击构建标签页底部的 [高级] 按钮

  7. 确保已设置 [Debug Info:] [full]

  8. 点击 [OK]并重建项目;-)

  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天全站免登陆