Walking out of the store with groceries generates a debt, no?
If there was a posted notice that no cash is accepted it's unlikely you'll get a criminal charge, but you can get civilly sued. Most places will just accept the cash then put up a picture saying "If this asshole shows up again, trespass him"
But also, I think that most people would not consider any debt to be incurred for transactions where the payment and receipt of goods is done at the same time, like in a grocery store.