I am pretty sure debt forgiveness outside of bankruptcy is taxable, but debt discharged through bankruptcy is not taxable.
The rules are very complicated. In general, forgiveness of debt is considered taxable income. But there are many exceptions. One of the exceptions, as you noted, involves bankruptcy.
Another exception, which might well apply to the situation described in the original post, involves
insolvency. Forgiven debt can be excluded from income to the extent that the borrower was insolvent at the time the debt was forgiven.
The definition of insolvency is that your debts are greater than your assets.
If your home is worth $200K, but your mortgage loan is $190K, and you have $5,000 in your checking account, and
no other assets, and you also owe $20,000 on credit cards, you are insolvent.
If you borrow money from grandma to pay off your credit cards, and you negotiate with the credit card banks to settle your credit card debt for 65 cents on the dollar, then you have forgiven debt which is potentially taxable. But because you were insolvent immediately before the debt was forgiven, some or all of the forgiven debt may
not be taxable.
The IRS uses a complicated formula to determine what portion of the forgiven debt is taxable. In some cases, the entire amount that is forgiven may be excluded from income.
Anyone in this situation definitely needs a tax professional.
BMK