When debugging a program, a situation often arises where it is necessary to trigger a breakpoint only if the variable contains a certain value. Very often this situation arises in the loop. Let’s look at an example and learn how to put a breakpoint on a certain condition. There is a ‘persons’ array. In the loop, we go through this array and display the first and last names in the console. I set a breakpoint inside the loop, but we need the breakpoint to work only if the person’s last name is ‘Brown’. Let’s see how to do it: