The breakpoint will not currently be hit.

来源:互联网 发布:西部数据mac驱动下载 编辑:程序博客网 时间:2024/05/16 13:03

vs2005无法进行单步调试:The breakpoint will not currently be hit. The source code is different from the original version
昨天对dnn跟踪调试的时,设了断点后运行到断点处总提示“The breakpoint will not currently be hit. The source code is different from the original version”,搜了一下,原因是:
The problem you're running into is caused by a new feature in the compilers and debugger to keep track of checksums for source files. Using this mechanism we can tell if the source file we're displaying in the debugger matches the original file used to build the application.
When you change a source file while debugging, and Edit and Continue is unavailable or disabled, you'll see warnings about the source not matching. Since Beta 2 we've improved the error message (no longer a Yes/No dialog, just a warning with an OK button). We've also changed the behavior so your breakpoints will no longer show this message when a source file does not match.
To clarify what the message is asking you to do: right-click on the breakpoint in question, and you should see a Location item. On the resulting dialog you should see an override checkbox which will get rid of the message you're seeing when you hover over your breakpoints. Or you could go to Tools->Options->Debugging->General and uncheck the "Require source to exactly match..." option, which will turn off all checksum functionality in the debugger.
偶的英语不太好,大致上看明白了,从菜单栏的 Tools->Options->Debugging->General 
取消  "Require source to exactly match..." 项的选择。
还有两个可能是
1.  打开项目属性,选择调试选项卡,将“启用非托管代码调试”一项钩上。
2. 由于Terminal Services 这个服务被禁用了,将这个服务设为自动,将这个服务启动。

 以上转自:http://www.cnblogs.com/mapk/archive/2007/08/19/861943.html

对于单个断点,可以右键—>location—>勾选“allow source code to be defferent”


本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/chunxiaopengshan/archive/2008/04/21/2311255.aspx