What does “Cannot evaluate expression because the code of the current method is optimized.” mean?

后端 未结 15 1445
北荒
北荒 2020-12-08 09:24

I wrote some code with a lot of recursion, that takes quite a bit of time to complete. Whenever I \"pause\" the run to look at what\'s going on I get:

<
15条回答
  •  攒了一身酷
    2020-12-08 10:05

    While the Debug.Break() line is on top of the callstack you can't eval expressions. That's because that line is optimized. Press F10 to move to the next line - a valid line of code - and the watch will work.

提交回复
热议问题