【解决方案】VC6.0不能断点调试

本文介绍了如何解决VC6.0中遇到的不能断点调试的问题,包括'One or more breakpoints cannot be set...'错误和断点定位错误。解决方法包括修改项目设置、清除断点和重新构建。同时,文章提到了Debug与Release模式的区别,并提供了针对'不能调试'错误的具体步骤。
摘要由CSDN通过智能技术生成

转载自:VC6.0 不能断点调试的解决方法_bin_zh123的博客-CSDN博客

现象是用 debug中的 step info或者run to cursor合着设置断点会出现One or morebreakpoints cannot be set and have been disabled.   Execution will stopat the beginning of the program.解决方法,

  • 1.在project->setting->c/c++-general->debug info->program databse for edit and continue ;
  • 2.edit->breakpoints->removeall;
  • 3.build->set active project configuration->*.exe win32 debug.

经过以上三步,ok!

另一篇:

一、两种调试方式

1、Debug模式:

2、Release模式:
单击菜单[Project]->[Settings…],出现"Project Settings"对话框,选择“Release”状态;
C/C++标签中的Category选择General,

OptimizationsDisable (Debug),
Debug infoProgram Database
Link标签中选中Generate debug info复选框。

注:Release模式稍好点,因为某些情况程序只能在Release下运行,如“显示对话框的DLL”在Debug下显示出窗口后 就死在那里。

二、调试中可能的错误:“不能调试”、“断点错误”
1、“不能调试”:
“One or more breakpoints cannot be set and have been disabled. Execution will stop at the beginning of the program.”
2、“断点错误”:
"One or more breakpoints are not positioned on valid lines.These breakpoints have been moved to the next valid line."

注意:“不能调试”跟“断点错误”不是一回事,“断点错误”会禁用某些错误断点,但“不能调试”则会禁用所有断点。

解决方法:
1、对于“断点错误”,VC会自动帮我们定位到一行,我们不用理会!
2、对于“不能调试”,解决步骤如下:
1)、重启电脑
2)、把工程拷贝到新目录,删除ncb, .opt,.plg文件。 注意是拷贝,不是剪切。
3)、再菜单栏(menu):Build->Rebuild All。
————————————————
版权声明:本文为CSDN博主「bin_zh123」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/bin_zh123/article/details/5733459

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值