在 Visual Studio 调试器中查看数组? [英] View array in Visual Studio debugger?
本文介绍了在 Visual Studio 调试器中查看数组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在 Visual Studio 调试器中查看数组?QuickWatch 只显示数组的第一个元素.
Is it possible to view an array in the Visual Studio debugger? QuickWatch only shows the first element of the array.
推荐答案
你可以试试这个 C++ 的小技巧.获取为您提供数组的表达式,然后附加一个逗号和您想要查看的元素数.展开该值将显示元素 0-(N-1),其中 N 是您在逗号后添加的数字.
You can try this nice little trick for C++. Take the expression which gives you the array and then append a comma and the number of elements you want to see. Expanding that value will show you elements 0-(N-1) where N is the number you add after the comma.
例如,如果 pArray
是数组,则在监视窗口中键入 pArray,10
.
For example if pArray
is the array, type pArray,10
in the watch window.
这篇关于在 Visual Studio 调试器中查看数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文