Debt gives value to money

What gives value to money? There was a time when money was pure gold. There was a time when money was a certificate that you own a quantity of gold in bank (banknotes). Now the money are just quality paper, without any deposit behind. How that it has any value?

Some said that money is just a convention, and the fact that the state accepts that coin as the "legal tender" gives it value. However, we know many coins that loosed theirs value even with the state sustaining it. How that other coins survives?

I claim that debt is the one that gives value to the today's money. Let's see why: