您使用什么调试器工具来查看 STL 容器的内容(在 Linux 上)
我使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Qt Creator 是 能够可视化 Qt 容器和 STL 容器。
正在进行的工作以获得GDB 支持漂亮打印 就其本身而言。 到目前为止,它还没有进入任何正式版本,但 Fedora 11 已经发布了。
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.
这是之前针对向量 对于 地图 - 特别注意地图问题中的第一个答案。
Here's some previous answers, for vectors and for maps - especially note the first answer in the maps question.