How to set conditional breakpoints in Visual Studio?

前端 未结 13 2374
忘了有多久
忘了有多久 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:19

    1. Set a breakpoint as usual.
    2. Right-click on the breakpoint marker
    3. Click "Condition..."
    4. Write a condition, you may use variable names
    5. Select either "Is True" or "Has Changed"

提交回复
热议问题