Actually, that is not the real reason credit cards are safer :)
You can dispute most debit card transactions now.
Besides the "one is availability of credit, the other, real money", there is a liability difference.
It used to be, at one point, that debit card liability was essentially unlimited but a consumer's liability for fraud on their credit card was limited to $50 by federal law (see 15 USC § 1643). Debit card liability now has a maximum as well, but your maximum liability actually depends on how quickly you notify.
If it's within two days, it's $50 liability on a debit card, but if you notify past that, they could legally make you liable for up to $500.
(There are other liability generating situations that exist for debit cards but not credit cards)