Linux 上 C++ 的 GUI 调试器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5344764/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-05 03:18:30  来源:igfitidea点击:

GUI debugger for c++ on linux

c++linuxuser-interfacedebugging

提问by user665033

I'm looking for a GUI c++ debugger for Linux. Specifically, I need a debugger capable of dereferencing STL and Boost containers.

我正在寻找适用于 Linux 的 GUI C++ 调试器。具体来说,我需要一个能够取消引用 STL 和 Boost 容器的调试器。

I have tried DDD and Eclipse/CDT; both of these debuggers have failed to dereference the aforementioned containers. I admit this may be a result of my lack of experience but I have certainly tried. It is my understanding, at the time of this posting, that latest versions of DDD and Eclipse (Helios) have still not resolved the issue.

我尝试过 DDD 和 Eclipse/CDT;这两个调试器都未能取消对上述容器的引用。我承认这可能是我缺乏经验的结果,但我确实尝试过。据我了解,在发布本文时,最新版本的 DDD 和 Eclipse (Helios) 仍未解决该问题。

Any related advice is appreciated,

任何相关的建议表示赞赏,

Thanks.

谢谢。

回答by newprint

Intel makes excellent C++ debugger and it is free for educational and Non-profit development. Google - intel compiler non-profit

英特尔制作了出色的 C++ 调试器,它可免费用于教育和非盈利性开发。谷歌 - 英特尔编译器非盈利组织

回答by Dr. Snoopy

DDD is just a GUI frontend to GDB, and Eclipse probably is too (not sure), you need to use GDB macros to pretty-print STL containers, here is some info about it:

DDD 只是 GDB 的 GUI 前端,Eclipse 可能也是(不确定),您需要使用 GDB 宏来漂亮地打印 STL 容器,以下是有关它的一些信息:

http://sourceware.org/gdb/wiki/STLSupport

http://sourceware.org/gdb/wiki/STLSupport

回答by j4x

If DDD gives not what you want, hardly you'll find something different, as everybody uses GDB.

如果 DDD 提供的不是您想要的,您几乎不会发现不同的东西,因为每个人都使用 GDB。

Anyway, you may give a try on

无论如何,你可以试一试

  • Kdbgif you want a standalone debugger.
  • Kdevelopif you want a full IDE.
  • Kdbg如果你想要一个独立的调试器。
  • 如果您想要完整的 IDE,请使用Kdevelop

Kdevelop 4.2 (beta) has some nice features. Hope you have luck.

Kdevelop 4.2 (beta) 有一些不错的特性。希望你好运。

You may also want to read what others have said:

您可能还想阅读其他人所说的话:

回答by H?vard S

You can use GDB to dereference STL containers with this in your .gdbinit. Choose a graphical front-end to GDB such as DDD or Eclipse, and you should be all set!

您可以使用 GDB在您的.gdbinit. 选择 GDB 的图形前端,例如 DDD 或 Eclipse,您应该一切就绪!

回答by Matt Joiner

Thisanswer applies to C++ debugging in Linux. Lack of good visualdebugging tools is one of many reasons C++ is extremely unpopular on Linux.

答案适用于 Linux 中的 C++ 调试。缺乏良好的可视化调试工具是 C++ 在 Linux 上极不受欢迎的众多原因之一。

回答by Sergei Nikulov

You also can take a look on Zero Bugs debugger hereor here

您还可以在此处此处查看零错误调试器

回答by Stephen Gennard

I would seriously look at the Eclipse and its CDK support, it is quite impressive and can be used on more than just Linux..

我会认真研究 Eclipse 及其 CDK 支持,它令人印象深刻,不仅可以用于 Linux。

回答by Stephen Gennard

You might consider TotalView, but it's not free.

您可能会考虑 TotalView,但它不是免费的。

回答by Prof. Falken contract breached

Nemiverdeserves to be more known IMHO. I find gdb and ddd so horrible (no offence, they are very powerful in their own way), that I gave up on interactive debugging for "printf debugging" whenever I could, for 15 years. Until I found Nemiver.

恕我直言,Nemiver应该更广为人知。我发现 gdb 和 ddd 太可怕了(没有冒犯,它们以自己的方式非常强大),以至于我放弃了“printf 调试”的交互式调试 15 年。直到我找到了Nemiver

Why I gave up on it then? I switched from DOS and Windows with Turbo C and Borland C++ to Linux. And going to GDB or DDD was like going from a pure delight of stepping through your code, to something you did if you had noother choice. In fact, I have not seen a debugger anywhere as good as the one in Turbo C. You set triggers, you follow structs and linked lists just by clicking through them etc. One of these days I am going to put a youtube clip up to show the kids these days what they are missing out on. Most tools are waybetter nowadays, but not all of them, by far. End of Rant.

为什么我当时就放弃了?我从使用 Turbo C 和 Borland C++ 的 DOS 和 Windows 切换到 Linux。和去GDB或DDD是像步进的一个纯粹的喜悦经历你的代码,如果你有你做了没有其他选择。事实上,我还没有见过像 Turbo C 中那样好的调试器。你设置触发器,你只需点击它们就可以遵循结构和链表等等。其中一天我要放一个 youtube 剪辑这些天向孩子们展示他们错过了什么。大多数工具的方式更好的今天,但不是所有的人,到目前为止。咆哮结束。