Search

Sponsored Links

Meta

Categories

Archives

Recent Posts

RSS Feeds

16
May

Little Visual Studio Debugger Trick

Here’s a little feature of Visual Studio’s debugger for C++. Consider the following code:

void foo( int* aiMyIntegerArray ){

}

void goo(){

int aiMyInts[5];

foo(aiMyInts);

}

If you set a breakpoint inside of the function foo and then do a QuickWatch on the aiMyIntegerArray argument, you only see the first element in the array, even though there are 4 more sneaky little integers in there. So to uncover the “hidden” integers, use the following in the QuickWatch expression evaluator:

aiMyIntegerArray,5

Popularity: 4%