我该如何补救“断点当前不会被击中”的问题。没有为该文档加载任何符号。警告?

编程入门 行业动态 更新时间:2024-10-24 02:02:12
本文介绍了我该如何补救“断点当前不会被击中”的问题。没有为该文档加载任何符号。警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

速成版上的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:

  • 右键单击您的项目
  • 选择 [属性]
  • 选择 [Build] 标签
  • 确保 [定义DEBUG常量] 和 [定义TRACE常量] 已选中
  • 确保未选中 [优化代码]
  • 单击 [高级] 按钮
  • 确保 [Debug Info:] 设置为 [完整]
  • 单击 [确定]并重建项目;-)
  • Right mouse click your project
  • Select [Properties]
  • Select the [Build] tab
  • Make sure [Define DEBUG constant] and [Define TRACE constant] are checked
  • Make sure [Optimize Code] is unchecked
  • Click the [Advanced] button at the bottom of the Build tabpage
  • Make sure that [Debug Info:] is set to [full]
  • Click [OK] and rebuild the project ;-)
  • (步骤6生成.pdb文件,这些是调试符号)

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

    更多推荐

    我该如何补救“断点当前不会被击中”的问题。没有为该文档加载任何符号。警告?

    本文发布于:2023-11-12 04:29:36,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1580513.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:断点   我该   符号   加载   文档

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!