Cannot evaluate expression because a thread is stopped at a point where garbage collection is impossible

前端 未结 11 1624
执笔经年
执笔经年 2020-12-15 16:54

Here is the error

Cannot evaluate expression because a thread is stopped at a point where garbage collection is impossible, possibly because the code

11条回答
  •  佛祖请我去吃肉
    2020-12-15 17:38

    First make sure that you're running your code in DEBUG mode and with code optimization turned off. you can turn that off from the properties of your project.

    If you made all of the above and the problem persists, then it's probably a problem with the stack having Debug.Break() on top of it. The solution for this is very easy, just press F10 to move to the next line and you should be able to evaluate the expression.

    You can check this SO question for more information about this issue.

提交回复
热议问题