That would include mortgagedebt which is forgiven as a result of foreclosure, as well as debt restructuring, short sale or deed in lieu of foreclosure, so long as the debt is associated with the purchase, building or improvement of your main home and even if that debt is considered recourse debt.
Established in 2007 with the onslaught of the foreclosure crisis, the Mortgage Forgiveness Debt Relief Act grants distressed homeowners an exemption from paying federal taxes on forgivenmortgage principals.