VS2008单步调试时出错,原来的断点处显示一个空心圆加一个右下角的警告图标,调试无效,会直接跳过该断点。鼠标放在该断点上有如下提示:
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 这个服务被禁用了,将这个服务设为自动,将这个服务启动。
我试了一下,确实就好了。
最后我还是想办法解决了这个问题,方法是先取消“Require source files to exactly match the original version”选项,然后修改一下程序,再在该文件设断点调试一下,然后重新选定“Require source files to exactly……”选项,这样就好了。
最后我想,断点调试失效的原因应该是我当时调试中间的时候顺便改写了程序,导致Visual Studio 2008对此进行了记录,而后面好像又强行关掉了Visual Studio 2008,导致记录没有被清除,后面就老是通不过源文件和debbuger编译时文件的同步检测。而后面我重新设断点调试和重新选中同步测试选项相当于把错误记录又清除掉了,所以就修复啦。
分享到:
相关推荐
VS 2005变量跟踪及断点调试.网上搜的,希望对大家有用
用VC开发了一个OCX控件,调试时,可以用测试容器进行断点调试,但是使用IE浏览器测试时,不能进入断点调试,但是网页时有输出的,说明OCX控件的调用时正常,但是不能进入调试,这个rar包能够解决
本文目录概述调试方法第一步:添加测试代码第二步:添加断点第三步:调试show Execution pointStep OverStep IntoForce Step IntoStep Outrun to Cursor查看断点修改变量值停止调试 概述 众所周知,断点调试是一个合格...
vs2008 高级条件断点 VS 指定值时下断点
在使用Weblogic服务器时配制断点调试
VUE断点调试技术 大家都知道后端开发是可以设置断点调试运行的,现在前端开发也可以和后端开发一样设置断点调试运行了
解决安装IE8后VS2005无法调试的问题
php5.6 下用zenddebugger单步断点调试代码2php5.6 下用zenddebugger单步断点调试代码2
前端vue+vscode断点调试详解 chrome,f12,Sources-Filesystem添加文件夹映射,即映射到本地项目的源码中进行断点调试 SourceMap能够让压缩翻译过的最终版的各种文件与原来未压缩过的文件对应起来
在VS2008中设置高级断点的方法。如设置当某个变量的值改变时的断点,设置某一段内存值发生变化时的断点。
eclipse断点调试基础,如何进入DEBUG状态,F5 F6 等各种eclipse的快捷键!
断点调试时java程序员经常用的,记得当初学习java时不会用断点,看了些资料,现在分享给大家,希望对不会的朋友有帮助。
配置xdebug远程断点调试php
Android JNI 断点调试C++,一个简单测试,方便初学者入门NDK环境搭建和java调用c++并调试
Unity3D断点Android真机调试。亲测可用。如有问题请加入QQ:94297366
在BMP中,如果使用VS的话,会发现断点无法停住,请按该文章说明,就可以正常使用断点了。
Microsoft Visual Studio 2008是面向Windows Vista、Office 2007、Web 2.0的下一代开发工具,代号“Orcas”,是对Visual Studio 2005一次及时、全面的升级。 VS2008引入了250多个新特性,整合了对象、关系型数据、...
在Ubuntu系统中编译安装Qt,然后分别安装qt Creator和GDB,qt Creator能通过GDB Server实现arm平台的断点调试,但是共享库的调试还没成功,希望达人能提供相应的指导。
D3D8通用游戏劫持,之前在做DNF的时候需要调试一些地址异常,就弄了一个劫持去调试,现在没用了,具体有需要的自己去改,硬件断点调试异常可以过CRC校验哦..,有时间整理一个易语言的版本..