How do I use GDB in Eclipse for C/C++ Debugging?(如何在 Eclipse 中使用 GDB 进行 C/C++ 调试?)
问题描述
我是 Visual Studio 用户,习惯于使用断点进行调试.我现在在 linux 环境中工作,并使用 Eclipse 作为 IDE.我是 linux 和 eclipse 的新手.我不知道如何在 eclipse 中使用 gdb.我尝试在命令行中使用 gdb,但并不像拥有 UI 那样简单.
I'm a Visual Studio user and am used to breakpoints for debugging. I'm now working in a linux environment and am using Eclipse as an IDE. I'm a newbie in linux and eclipse. I don't have any idea how to use gdb in eclipse. I tried using gdb in command line, but is not as easy as having a UI.
如何在 Eclipse 中使用 gdb?
How do I use gdb in eclipse?
推荐答案
以下说明适用于 Eclipse 3.5 (Galileo).对于 3.6 (Helios),除了第 2 步中的链接之外,它们是相似的.
The following instructions are for Eclipse 3.5 (Galileo). For 3.6 (Helios), they are similar except for the link in step 2.
- 转到帮助 > 安装新软件.
- 添加 CDT 存储库 http://download.eclipse.org/tools/cdt/发布/伽利略 到存储库列表.
- 选择 CDT 存储库.现在您需要从可用插件列表中安装 CDT 插件以及 GDB 支持(选择 CDT 主要功能以及 CDT GNU 工具链调试支持).
您现在应该能够在 Eclipse 中设置断点并检查变量的值.
You should now be able to set breakpoints and inspect values of variables in Eclipse.
另一种方法是安装 DDD(GDB 的 GUI 前端).
An alternative is to install DDD (an GUI frontend for GDB).
这篇关于如何在 Eclipse 中使用 GDB 进行 C/C++ 调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 Eclipse 中使用 GDB 进行 C/C++ 调试?


基础教程推荐
- 验证是否调用了所有 getter 方法 2022-01-01
- 不推荐使用 Api 注释的描述 2022-01-01
- 在 Java 中创建日期的正确方法是什么? 2022-01-01
- Java Swing计时器未清除 2022-01-01
- 如何在 Spring @Value 注解中正确指定默认值? 2022-01-01
- 多个组件的复杂布局 2022-01-01
- Java 实例变量在两个语句中声明和初始化 2022-01-01
- 如何在 JFrame 中覆盖 windowsClosing 事件 2022-01-01
- 从 python 访问 JVM 2022-01-01
- 大摇大摆的枚举 2022-01-01