使用c++builder调试代码时总是错过/忽略断点的解决方法

最近刚刚安装了c++builder,将已有的代码进行调试时添加的断点总是不执行,在网上搜了一堆说要转到debug模式下,说根据下面步骤执行即可““C++Builder–>Project–>Option…–>Compiler–>Full Debug”,说的太简单了,根本没找到这样的选项,最后上谷歌搜了一下,呵呵呵呵,完美解决,只需要进行如下设置即可。

· [C++ Compiler] → [Debugging] → [Debug information] = True;

· [C++ Compiler] → [Debugging] → [Debug line number information] = True;

· [C++ Compiler] → [Optimizations] → [Disable all optimizations] = True;

· [C++ Compiler] → [Optimizations] → [Generate fastest possible code] = False;

· [C++ Linker] → [Full Debug information] = True;

· [Delphi Compiler] → [Optimization] = False;

· [Delphi Compiler] → [Use debug .dcus] = True;

(e.g. the default configuration template for MDI application is wrong)

· delete all the .pch, .# and .tds files and let the compiler recreate

· if you are running the IDE under VirtualBox consider that some versions have problem with breakpoints (v4.3.x)

实际上我只是操作了上面几条,最后两条没弄,设置后添加的断点就可以执行了。下面附上网址以供参考

https://stackoverflow.com/questions/26999818/c-breakpoints-are-ignored-missed

但是后面看到release和debug版本之间的转换工具,入下图所示,在编辑界面右侧的Project manager对话框中有下面选项,刚开始默认的是release版本,可以双击转到debug下,但是进过前面的修正可以执行断点故没有尝试过:

使用c++builder调试代码时总是错过/忽略断点的解决方法

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值