vc++调试时出现One or more breakpoints cannot be set ......

来源:互联网 发布:飞思卡尔怎么样知乎 编辑:程序博客网 时间:2024/06/03 09:26

转自http://blog.sina.com.cn/s/blog_3fb753380100gzlr.html

 

近来调程序的时候老碰到One or more breakpoints cannot be set ......,然后不能用断点调试,郁闷不只1次了,每次都花时间上网查,效率太低了。还是把有用的方法记录一下比较好。

 

方法一:

project->setting->c/c++-general->debug info->program databse for edit and continue ;

edit->breakpoints->removeall;

build->set active project configuration->*.exe win32 debug.

试用过n次,但无效。

 

方法二:

删除ncb、OPT文件重建

这个方法对当前的情况也无用。

 

方法三:

当方法一和方法二都确定无用的情况下,不妨用一下方法三。在我的实践中,这个方法奏效了。

project-》settings-》link -》选中 generate debug info

 

问题解决!