该断点当前不会被击中,源代码与原始代码不同(即使在清理/重建后) [英] This Breakpoint Will Not Currently Be Hit, The Source Code is Different from the Original (even after cleaning/rebuilding)

查看:99
本文介绍了该断点当前不会被击中,源代码与原始代码不同(即使在清理/重建后)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.NET 4,控制台应用程序。该项目设置为调试模式。设置的断点在主/启动项目中。在解决方案和项目级别上,我都右键单击->清理,然后右键单击->重建。

.NET 4, console application. The project is set to 'Debug' mode. The breakpoint being set is in the primary/startup project. I have right-clicked -> Clean, and right-clicked -> rebuild, both on the Solution and project levels.

按照,我已经确认,对于当项目已过时,我的构建和运行选项都设置为提示和何时发生构建或部署错误,而我在F5进行构建/运行时却没有得到提示。

Following the instructions in this SO question, I have confirmed that my "Build and Run" options are set to 'prompt' for both 'When projects are out of date' and 'when build or deployment errors occur', and I am NOT getting a prompt when I F5 to build/run.

此外,

我监视了应用程序的输出窗口,请参见以下行:

I monitored the output window of the application, see this line:

 'MyApplication.exe': (Managed (v4.0.30319)): Loaded 'C:\exepath' Symbols Loaded.

我重新启动了VS2010实例。我重新启动了所有其他项目的所有打开的VS2010实例。我什至经历了重启。

I restarted the VS2010 instance. I restarted all open VS2010 instances (of other projects). I've even gone through a reboot.

但是,我在启动项目中设置的断点是一个空心的红色圆圈,注意此断点将

However, the breakpoint I am setting in the startup project is a hollow-red circle, with the notice that 'This breakpoint will not currently be hit, The source code is different from the original', and, in fact, is never hit.

所以,这实际上是两个问题:

So, this is really 2 questions:

1)如何解决此问题,以便可以正确断点

1) How do I fix this problem so I can properly breakpoint

2)当我看到此消息时,是否表示我的代码是从旧版本执行的吗?

2) When I see this, does that mean my code is executing from an older build?

推荐答案

我自己曾经遇到过这个问题,但这是在vsto插件上的。在这种情况下,users / appdata目录下实际上已加载了中间文件,而不是我的应用。

I've had this problem once myself but that was on a vsto addin. In that case there were left over intermediate files under the users/appdata directories that were actually loaded instead of my app.

此博客文章,其中包含此错误的全部可能原因,而其他用户的评论中还有很多其他原因

There is this blog article that has a whole load of possible reasons for this error and then a whole bunch more in the comments from other users

这篇关于该断点当前不会被击中,源代码与原始代码不同(即使在清理/重建后)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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