"Cannot obtain value of local or argument as it is not available at this instruction pointer, possibly because it has been optimized away"
To fix it and get rid of optimization to be able to see the values and also keep debugging in steps without jumping between lines because of optimized code then I unchecked the [Optimize Code]:
Project Properties --> under Build --> Unchecked the [Optimize Code] checkbox.
In the Advanced Options in the project build tab, I set the the "Debug Info" combo to "Full".