Benjamin

静以修身,俭以养德,非澹薄无以明志,非宁静无以致远。
随笔 - 397, 文章 - 0, 评论 - 196, 引用 - 0
数据加载中……

vc10设置断点失效的解决方法

在运行前用F9设置了断点,但是运行后,那个断点却变成了空心圆和黄色感叹号标志。
鼠标放到失效断点上,会弹出一些英文,告诉你如果解决这个问题: 

The breakpoint will not currently be hit.The source code is different from the original version.

To allow the breakpoint to be hit when the source code is different,right-click on the breakpoint,

Choose ‘location…’,and turn on ‘Allow the source code to be different from the original version.

To allow this for all breakpoints,disable the option ‘Require source files to exactly match the original version’ under Tools,Options,Debugging,General.
我们这里直接点击失效断点的右键菜单选“location”,在Allow the source code to be different from the original version.的方框上
点击一下,添加个勾就行。
在运行至断点处时会提示“The source file is different from when the module was built.Would you like the
debugger to use it anyway?”,选下面的“是(Y)"按钮就可以了,程序会跳到断点处。


posted on 2011-07-26 15:05 Benjamin 阅读(4291) 评论(0)  编辑 收藏 引用 所属分类: VC


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理