While canceled debts are usually considered taxable income, debts discharged in bankruptcy are not. You may want to check the IRS link below for more information.
Read form 982 and the instructions that accompany it. Discharge is not a taxable event. Also, if the debt is forgiven prior to filing, but you were insolvent at the time, it is still not taxable. See IRS.GOV for more information.
Internal Revenue Code Section 108 generally treats cancelled debt as taxable income; however, it also lays out certain exceptions, including a discharge of debts in bankruptcy and others. Be aware that even though debts cancelled in bankruptcy are not taxed as income, they can reduce what are called "tax attributes," such as loss carry-forwards and basis in property, though these do not affect most of my clients. IRS Form 982 is the form to use, or have your accountant use, if you receive a 1099-C from a creditor reporting cancellation of debt income. It is filed with your 1040 for the relevant tax year.