In my book, there are two types of hecklers. Type one enjoys the show and thinks he can make it better by aggressive participation, like talking back to the performer or making funny remarks.
I would exchange funny remarks with this type of heckler. In the end, as long as I don’t insult him, he usually falls in line and becomes a big supporter.
Type two is the one who wants to mess up your trick. He wants to see you fail. He wants to embarrass you, because he gets his entertainment in seeing you in a difficult situation.
I would stop the performance when a heckler of this type is in the audience.
There’s no use debating with the heckler. Even if you win the debate, the show will still suffer. Better cut short the show rather than allow somebody to mess it up completely.