Sometimes liability and debt mean the same thing. For instance in the debt-to-equity ratio, debt means the total amount of liabilities. In this case, debt not only includes short-term and long-term loans and bonds payable, debt also includes accrued wages and utilities, income taxes payable, and other liabilities. In other words, sometimes debt is intended to mean all obligations...all amounts owed...all liabilities.
At other times, the word debt is used more narrowly to mean only the formal, written financing agreements such as short-term loans payable, long-term loans payable, and bonds payable.
Your question is a good reminder that people have different perspectives and therefore have different understandings and definitions of terminology.