One exception is for insolvent debtors. Insolvent debtors do not pay tax on the amount of cancelled debt that is less the amount of the insolvency. Exclude from gross income debt that is cancelled up to amount by which the debtor is insolvent. Insolvency is the amount that liabilities exceed the fair market value of assets. So for example, a debtor who has assets of $10,000 but liabilities of $15,000 would be insolvent by $5,000. If that same individual that was insolvent in the amount of $5,000 and had $6,000 in cancelled debt, only $1,000 of the cancelled debt would be taxable. See IRS publications 908 and 525 for more information. A tax accountant or tax attorney should be consulted if you will not be filing bankruptcy but have cancelled debt.
The other exception is for a debtor who files for bankruptcy. Debts that are discharged in bankruptcy, however, do not create a taxable event. See, IRS Publication 908.