[英]visual studio 2013 debug iterator container
I'm doing a lot of debugging dealing with iterators right now, and wanted to know if anybody knew a simple way to get a watch variable with all of the elements in the container being referenced by the iterators, as the functions only have access to the iterators and not the containers themselves. 我现在正在做大量与迭代器有关的调试,想知道是否有人知道一种简单的方法来获取监视变量,而容器中的所有元素都由迭代器引用,因为这些函数只能访问迭代器,而不是容器本身。
Maybe some way to enumerate starting from the iterator and the next x elements? 也许有某种方法可以从迭代器和下一个x元素开始枚举?
As Praetorian mentioned, in VS you can enumerate the values of the pointer to see the contents of the container your iterator is iterating over. 如Praetorian所述,在VS中,您可以枚举指针的值以查看迭代器正在迭代的容器的内容。
A watch variable like: 一个监视变量,例如:
(MyIterator)._Ptr, 5
or 要么
(MyIterator)._Ptr, NumElements
will enumerate the first NumElements elements in the container. 将枚举容器中的第一个NumElements元素。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.