Can I set a breakpoint when variable is getting a specific value in .NET?

前端 未结 7 1955
执念已碎
执念已碎 2020-12-04 23:29

I am using Visual Studio 2010, and I know this feature is available in C++.

I need to debug some code, that changes a variable to several values. I want to debug the

7条回答
  •  囚心锁ツ
    2020-12-05 00:11

    You can do both of these things.

    1. Set the breakpoint in VS. Right click on the red dot in the margin and select Add Condition. In there you can say var==value and select "Is True".
    2. You can probably achieve this with the "Has Changed" option in the dialog above.

提交回复
热议问题