When I use a watch I get this error message:
Cannot obtain value of the local variable or argument because it is not available at this instruction pointer, possibly because it has been optimized away.
It's really strange because I can only get intellisense in some parts of the application. The issue originally started when I couldn't step into my methods, so through searching. I turned off the just my code option in the debugger.
So far I have tried:
- Restart machine
- Clean + Rebuild VS2015
- I have turned off all optimisations for debugging
I have no idea what to do. Can anyone help?
EDIT:
Code where it happens:
public IList<string> PopulateFilterList(string selectedFields) {
IList<string> ExcludedFields = _homeRepository.GetExcludedFields();
Type t = typeof(Invoice);
return null;
}
I'm just trying to look at t
Edit: If I check the option 'Suppress JIT optimisation on module load' in the debugger I get intellisense. I get intellisense