Always include just the compatible debug libraries:
I came here because Visual Studio 2010 didn't display debug info for some local variables within the opencv 2.4.2 library. In Mat _InputArray::getMat(int i) const I got to see several variables but k and vv were missing. (and I got an exception in cv::_interlockedExchangeAdd when getMat would (wrongly) return only empty matrices.)
Anyway, the problem was: I had included (as library, in the PATH for the dlls and as #pragma comment) both the debug and the release libraries. This seemed to have caused the problem. Everything worked well after included just the debug libraries.