简体   繁体   English

Visual Studio 2013调试迭代器容器

[英]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.

相关问题 visual studio中的_ITERATOR_DEBUG_LEVEL错误 - _ITERATOR_DEBUG_LEVEL error in visual studio 在Visual Studio 2015中使用QtAddIn调试Visual Studio 2013的运行时 - Debug Runtime of Visual Studio 2013 with QtAddIn in Visual Studio 2015 调试断言失败了visual studio 2015:矢量迭代器不是dereferencable - Debug assertion failed visual studio 2015: vector iterator not dereferencable visual studio中的_ITERATOR_DEBUG_LEVEL错误,接受的解决方案无效 - _ITERATOR_DEBUG_LEVEL error in visual studio, accepted solution not working Visual Studio 2013 调试模式和控制台不起作用 - visual studio 2013 debug mode and console don't working 无法在Visual Studio 2013调试器中调试CRT源文件 - Unable to debug the CRT source files in Visual Studio 2013 debugger OpenGL 程序仅在 Visual Studio 2013 中的调试模式下工作 - OpenGL program works only in Debug mode in Visual Studio 2013 如何在 Visual Studio 2013 中的调试模式下关闭断言 - How to turn off ASSERTs in debug mode in Visual Studio 2013 如何在Visual Studio 2013中使用带有/不带Microsoft Application Verifier的Debug - How to use Debug with/without Microsoft Application Verifier in Visual Studio 2013 select_on_container_copy_construction Visual Studio 2013中的内部错误 - select_on_container_copy_construction internal error in visual studio 2013
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM