views:

28

answers:

1

I know that most of you might have noticed now. When you try to evaluate an expression using watch on RAD Studio 2007, it does not evaluate.

For example, if I had a vector, I could not do "vecData.size()", if I do "vecData.size", it just gives an address.

Is there any other way to watch the size and view each element of the vector in RAD Studio while debugging?

+1  A: 

If you disable the compiler optimisations in the project options, the debugger will then be able to evaluate vecData.size().

"Project Options->C++ Compiler->Optimizations->Disable all optimizations" set this option to "True".

This works for 2009, I believe it is the same for 2007.

Seth
This is interesting. I will try this when I get a code gear on my PC again. Thanks.
Nassign