Search

Sponsored Links

Meta

Categories

Archives

Recent Posts

RSS Feeds

16
May

Little Visual Studio Debugger Trick

Related Blog Items

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: 6%

You need to log on to convert this article into PDF


Related Blog Items

No Comments

No comments yet.

Leave a comment

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image