"Community Debt" is:
any debt that you or your spouse acquired while married or
any debt for which you and your spouse are co-signers
in these ten states:
Alaska (not Community Debt by default, but you can sign an agreement with your spouse making your debt Community Debt)
If either you or your spouse file bankruptcy, neither of you will be responsible for your dischargeable Community Debt any longer.
If you divorce or legally separate from your spouse before you file bankruptcy, you will only be responsible for debts that you personally incurred -- with a few exceptions. Former spouses are still responsible for any debts that either of them incurred for family necessities, to maintain joint property (like a home), or for which they are still co-signers.
In most states these rules apply equally to debts acquired in traditional and Common Law marriages, same-sex marriages, same-sex domestic partnerships and civil unions in states where those relationships are the equivalent of marriage, but not in states where the relationship does not confer all the rights of marriage.
It is important that you accurately determine which type of debt you have so that you can determine who will be responsible for it after you file bankruptcy.