I've done both. Usually for me it depends on whether I have cash on hand for the tip (sometimes I don't because we use the debit card for just about everything so I don't always have cash) or if I decide to put everything on my card. Or, sometimes if I have cash but not the correct bills for a tip, I'll pay at the counter then walk back to the table to leave the tip there.