How to set conditional breakpoints in Visual Studio?

前端 未结 13 2329
忘了有多久
忘了有多久 2020-11-27 03:35

Is there an easy way to set conditional breakpoints in Visual Studio?

If I want to hit a breakpoint only when the value of a variable becomes something, how can I do

13条回答
  •  遥遥无期
    2020-11-27 04:07

    Just another way of doing it, (or if you are using express) add the condition in code:

    if(yourCondition)
    {
        System.Diagnostics.Debugger.Break();
    }
    

提交回复
热议问题