无法从Winui 3模板中查看类库中的班级库中局部变量的值
我已经修改了包括.core项目的模板Winui 3项目。我正在使用该项目的方式与模板进行的方式相同,除了我将返回数据返回数据的方法转换为异步数据,以便我可以在数据被解析而不是全部更新UI时更新UI。
但是,这使我无法查看调试器中的局部变量值。我得到
无法获得本地变量或参数的值,因为它在此说明指针上无法使用,这可能是因为它已被优化。
我正在将断点设置在值无法收集垃圾的行上,因为它在下一行上使用。从上到下逐步逐步逐步揭示值。
本质上是这样的代码:
int i = 1;
int j = 2;
i = j + 1;
我在第二行上放了一个断点,但无法看到i的值。
我已经禁用了所有的优化。我还验证了类库产生的.dll在模块窗口中未进行优化。我一直在尝试解决这个问题,这严重影响了我的生产力。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论