16
May
Little Visual Studio Debugger Trick
Related Blog Items
- Swapping variables without additional space
- Calling conventions on the x86 platform
- Reference Counting
- C++ and Java Context Switch
- C++ Advanced Tutorial - Lesson 6
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 - Swapping variables without additional space
- Calling conventions on the x86 platform
- Reference Counting
- C++ and Java Context Switch
- C++ Advanced Tutorial - Lesson 6
Related Blog Items
- Swapping variables without additional space
- Calling conventions on the x86 platform
- Reference Counting
- C++ and Java Context Switch
- C++ Advanced Tutorial - Lesson 6
No Comments
No comments yet.