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

时间:2022-09-02 09:01:17

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...

我使用gdb(实际上是DDD),从容器中获取元素是不可能的。所以我通常最后滚动自己的循环进行调试......

What do you do?

你是做什么?

2 个解决方案

#1


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

Qt Creator能够可视化Qt容器和STL容器。

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.

正在进行的工作是让GDB自己支持漂亮的打印。到目前为止它还没有进入任何正式版本,但Fedora 11已经发布了它。

#2


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

这里是一些以前的答案,对于矢量和地图 - 特别注意地图问题中的第一个答案。

#1


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

Qt Creator能够可视化Qt容器和STL容器。

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.

正在进行的工作是让GDB自己支持漂亮的打印。到目前为止它还没有进入任何正式版本,但Fedora 11已经发布了它。

#2


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

这里是一些以前的答案,对于矢量和地图 - 特别注意地图问题中的第一个答案。