简体   繁体   English

VC ++ 2010忽略断点

[英]VC++ 2010 ignoring breakpoints

Last Friday before I went home for the weekend, breakpoints in my code were working fine. 在上周末回家之前的上周五,我的代码中的断点工作正常。 Today, they are not working fine. 今天,他们的工作状况不佳。

Since last Friday, I 从上周五开始

  • Rebooted my computer 重新启动我的电脑
  • Downloaded new source code from TFS code repository 从TFS代码存储库下载了新的源代码
  • Cleaned and built the entire solution for Release mode 清理并构建了用于发布模式的完整解决方案
  • Cleaned and built the entire solution for Debug mode 清理并构建了用于调试模式的完整解决方案
  • Added/moved a few lines from two source modules 从两个源模块添加/删除了几行
  • Cleaned and rebuilt just the project that I am working on. 仅清理并重建了我正在从事的项目。
  • Debugged the solution with no parameters -- breakpoints worked correctly 无参数地调试解决方案-断点正常工作
  • Debugged the solution with parameters to run to just my part of the code -- breakpoints do not work, but from the output from the program, it is clear that that portion of the code had run. 使用参数调试该解决方案以仅运行到我的代码的一部分-断点不起作用,但是从程序的输出中可以清楚地看到该部分代码已运行。
  • I do not recall anything else that I might have done to cause this behavior. 我没有回想起我可能做过的任何其他事情来导致这种现象。

I have seen this before, but I do not recall how I corrected the situation. 我以前见过,但我不记得我是如何纠正这种情况的。

This is a Unit Test project, so it is never built in Release mode. 这是一个单元测试项目,因此永远不会在发布模式下构建。 I have checked the date/time stamp on the file to ensure that the executable that I just built is the one I am about to run. 我已经检查了文件上的日期/时间戳,以确保刚构建的可执行文件是我将要运行的可执行文件。

If I set a breakpoint at the entrypoint of the executable, the debugger stops there, but not at any other breakpoint that I've set. 如果我在可执行文件的入口点设置了一个断点,则调试器将在此处停止,但不会在我设置的任何其他断点处停止。

This is completely Native code, so please don't bother with .NET options that do not apply and that I cannot access anyway because I'm coding in C++. 这完全是本机代码,因此请不要为那些不适用的.NET选项而烦恼,因为我使用C ++进行编码,所以我仍然无法访问。

What can cause the IDE to suddenly turn off debugging like this? 是什么会导致IDE突然关闭这样的调试功能?

Thanks in advance, 提前致谢,

Richard Johnson 理查德·约翰逊

One thing I almost hate to mention - are you sure your solution built completely? 我几乎不愿提及的一件事-您确定解决方案是完全构建的吗? If not, your breakpoints would be out of sync with the binary and VS would disable them. 如果不是这样,您的断点将与二进制文件不同步,而VS将禁用它们。 You'd see that with a yellow overlay on the breakpoint icon. 您会在断点图标上看到黄色覆盖。 Assuming a good build, you might have to delete your NCB (Intellisense db) file, if it's become corrupt. 假定构建良好,如果损坏,则可能必须删除NCB(Intellisense db)文件。 Doing a clean rebuild won't do this. 进行干净的重建不会这样做。 If that doesn't help, let us know what your exact symptoms are - does the breakpoint "light up" in the IDE, but just not fire? 如果这没有帮助,请告诉我们您的确切症状-断点是否在IDE中“点亮”,但不会触发? Or does the IDE refuse to turn the breakpoint on altogether? 还是IDE拒绝完全打开断点?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM