Cannot view values of local variables in async method of class library from WinUI 3 template

Viewed 56

I've modified the template WinUI 3 project which includes a .Core project. I'm using this project the same way that the template did except I've converted the method which returns data into an asynchronous one instead so that I can update the UI as data is parsed rather than all at once.

However, this is preventing me from viewing local variable values in the debugger. I instead get

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.

I'm setting breakpoints on lines where the values couldn't possibly be garbage collected as it is being used on the very next line. Stepping though the method from top to bottom does not help to reveal values.

Essentially code like this:

int i = 1;
int j = 2;
i = j + 1;

where I've put a breakpoint on the second line but am unable to see the value of i.

I've disabled every optimization I can. I've also verified that the .dll produced by the class library is not optimized in the modules window. I've been trying to solve this for days and it's severely affecting my productivity.

0 Answers
Related