哪个是最好的 Linux C/C++ 调试器(或 gdb 的前端)来帮助教授编程?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/79537/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Which is the best Linux C/C++ debugger (or front-end to gdb) to help teaching programming?
提问by
I teach a sort of "lite" C++ programming course to novices ("lite" meaning no pointers, no classes, just plain old C, plus references and STL string and vectors). Students have no previous experience in programming, so I believe that using an interactive debugger would help them understand program flow, variables, and recursion.
我向新手教授一种“精简”的 C++ 编程课程(“精简”意味着没有指针,没有类,只有普通的旧 C,加上引用和 STL 字符串和向量)。学生以前没有编程经验,所以我相信使用交互式调试器可以帮助他们理解程序流程、变量和递归。
The course is taught in Linux. Teaching them to use gdb is just overkill (they will not use nor understand most features). I just need something simple but easy to use: to see at which line the program is now, what is in the stack (local variables, previous calls, etc.). I look something similar to old Turbo Pascal or Turbo C++ Borland's debugger, or Visual Studio debugger.
该课程是在 Linux 上讲授的。教他们使用 gdb 只是矫枉过正(他们不会使用也不会理解大多数功能)。我只需要一些简单但易于使用的东西:看看程序现在在哪一行,堆栈中有什么(局部变量、以前的调用等)。我看起来类似于旧的 Turbo Pascal 或 Turbo C++ Borland 的调试器,或 Visual Studio 调试器。
Thank you,
谢谢,
回答by jbleners
回答by Jon Ball
You may want to check out Eclipse CDT. It provides a C/C++ IDE that runs on multiple platforms (e.g. Windows, Linux, Mac OS X, etc.). Debugging with Eclipse CDT is comparable to using other tools such as Visual Studio.
您可能想查看 Eclipse CDT。它提供了一个可在多个平台(例如 Windows、Linux、Mac OS X 等)上运行的 C/C++ IDE。使用 Eclipse CDT 进行调试类似于使用其他工具(例如 Visual Studio)。
You can check out the Eclipse CDT Debug tutorialthat also includes a number of screenshots.
您可以查看Eclipse CDT 调试教程,其中还包含许多屏幕截图。
回答by HidekiAI
Perhaps it is indirect to gdb (because it's an IDE), but my recommendations would be KDevelop. Being quite spoiled with Visual Studio's debugger (professionally at work for many years), I've so far felt the most comfortable debugging in KDevelop (as hobby at home, because I could not afford Visual Studio for personal use - until Express Edition came out). It does "look something similar to" Visual Studio compared to other IDE's I've experimented with (including Eclipse CDT) when it comes to debugging step-through, step-in, etc (placing break points is a bit awkward because I don't like to use mouse too much when coding, but it's not difficult).
也许它对 gdb 是间接的(因为它是一个 IDE),但我的建议是KDevelop。被 Visual Studio 的调试器宠坏了(专业工作多年),到目前为止我觉得在 KDevelop 中调试最舒服(作为家里的爱好,因为我买不起 Visual Studio 供个人使用 - 直到 Express Edition 出现)。与我尝试过的其他 IDE(包括 Eclipse CDT)相比,它在调试单步调试、单步调试等方面确实“看起来与 Visual Studio 类似”(放置断点有点尴尬,因为我不这样做)编码时不喜欢过多使用鼠标,但不难)。
回答by CMircea
Qt Creator, apart from other goodies, also has a good debugger integration, for CDB, GDB and the Symnbian debugger, on all supported platforms. You don't need to use Qt to use the Qt Creator IDE, nor do you need to use QMake - it also has CMake integration, although QMake is very easy to use.
Qt Creator除了其他好东西外,还具有良好的调试器集成,适用于所有支持的平台上的 CDB、GDB 和 Symnbian 调试器。您不需要使用 Qt 来使用 Qt Creator IDE,也不需要使用 QMake - 它也具有 CMake 集成,尽管 QMake 非常易于使用。
You may want to use Qt Creator as the IDE to teach programming with, consider it has some good features:
您可能想使用 Qt Creator 作为 IDE 来教授编程,认为它具有一些不错的功能:
- Very smart and advanced C++ editor
- Project and build management tools
- QMake and CMake integration
- Integrated, context-sensitive help system
- Excellent visual debugger (CDB, GDB and Symbian)
- Supports GCC and VC++
- Rapid code navigation tools
- Supports Windows, Linux and Mac OS X
- 非常智能和先进的 C++ 编辑器
- 项目和构建管理工具
- QMake 和 CMake 集成
- 集成的上下文相关帮助系统
- 优秀的可视化调试器(CDB、GDB 和 Symbian)
- 支持 GCC 和 VC++
- 快速代码导航工具
- 支持 Windows、Linux 和 Mac OS X