You can use condition breakpoint for this sort of behavior, just set a breakpoint on a line on which you want to break and then right click on the point at the left and choose condition, in popup enter desired condition (in your case is double.IsInfinity(x))