How do I “run until this variable changes” when debugging?

前端 未结 8 808
醉话见心
醉话见心 2020-12-30 23:29

When debugging my C#, I often want to know when a variable\'s value changes and then investigate the state of the program.

Currently, I do

8条回答
  •  南方客
    南方客 (楼主)
    2020-12-30 23:57

    You could write an if statement that checks for a change and have a break point happen within that if statement, thus it breaks initially, then you click resume, it continues until it hits this break point.

提交回复
热议问题