sublimegdb 不能停在断点 [英] sublimegdb can not stop in the breakpoint

查看:125
本文介绍了sublimegdb 不能停在断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的 sublime text 2 中安装了 sublimeGDB,我的设置是正确的.然后我在一行中按 F9 来设置断点.当我按F5运行时,我发现我的程序不能停在断点处,程序运行完毕.下面显示的信息是GDB 会话结束".GDB 视图仅在 0.5 秒内出现,然后消失.

I hava install sublimeGDB in my sublime text 2, and my setting is right. Then I press F9 in a line to set a breakpoint. When I press F5 to run, I found my program can not stop on the breakpoint, and the program finished running. The information show below is "GDB session ended". The GDB view is appear in just 0.5 sec., and then disappear.

推荐答案

您必须通过在 GDB 命令行中添加 -g 选项来编译包含调试信息的可执行文件Sublime Text C++ 构建系统的默认设置.查看这个答案以了解更多详情.

You have to compile your executable with debug information included by adding -g option to the GDB command line which is not being added by default by Sublime Text C++ build system. Check this answer for more details how to do it.

这篇关于sublimegdb 不能停在断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆