July 2017
Beginner
466 pages
9h 37m
English
Conditional expressions are often useful if you want to hit a breakpoint on some conditions. For example, you would like to debug a for statement when a specific index count is reached or when an item in a collection meets a specific value.
To add a conditional expression to a breakpoint inside Visual Studio 2017, select the Conditions checkbox from the Breakpoint Settings dialog and select the condition type as Conditional Expression from the dropdown. The next dropdown allows you to select the comparer (Is true or When changed). The text box next to it allows you to enter the condition. Here in this case, we entered i == 5:
In the preceding example, the breakpoint will directly hit when the variable i of the ...
Read now
Unlock full access