How to circumvent "Cannot obtain value of local or argument as it is not available at this instruction pointer, possibly because it has been optimized away
Sometimes when debugging code we can't "watch" variable's value and only get this alerting message:
Cannot obtain value of local or argument as it is not available at this instruction pointer, possibly because it has been optimized away
As this has been discussed in How to disable optimizations when debugging Reference Source. According to his second suggesion, I just leave a checkbox blank:
Then rebuild the project. Then in your main project which references the "originally optimized" project , you could see the variables are accessible now.