In Visual Studio, most of my objects and variables cannot be resolved during a debugging session for various reasons. This means I cannot inspect or watch objects or their invoke their functions making it extremely difficult to debug my code because most of my expressions simply won't work. Some typical errors I get when adding an expression to the watch window include:
- CXX0019: Error: bad type cast
- CXX0059: Error: left operand is class not a function name
- CXX0058: Error: overloaded operator not found
Most often these expressions involve overloaded operators and/or template class objects.
Why is this happening? how do you fix it?