您使用什么调试器工具来查看 STL 容器的内容(在 Linux 上)

发布于 2024-07-27 12:23:56 字数 84 浏览 0 评论 0原文

我使用 gdb(实际上是 DDD),从容器中获取元素是不可能的。 因此,我通常会出于调试目的而滚动自己的循环......

你会做什么?

I use gdb (actually DDD), and getting an element out of container is impossible. So I typically end up rolling my own loop for debugging purposes...

What do you do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

云淡风轻 2024-08-03 12:23:56

Qt Creator is capable of visualizing both Qt containers and STL containers.

There's ongoing work to get GDB to support pretty printing on its own. So far it hasn't made it into any official releases yet, but Fedora 11 shipped it already.

愛放△進行李 2024-08-03 12:23:56

这是之前针对向量 对于 地图 - 特别注意地图问题中的第一个答案。

Here's some previous answers, for vectors and for maps - especially note the first answer in the maps question.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文