Dividing debt during divorce can be much harder than dividing assets, as debt is a burden that no one ever wants to carry. The cleanest way to deal with debt is to pay it off before the divorce process so that both parties are able to start their new lives debt free, though certainly a little less well-off. If this isn't possible, the next best option is that one party agrees to take responsibility for the debt in exchange for receiving more assets from the division of property.
The final option is for the couple to share responsibility for the debt. This is far from ideal, because if one party fails to pay off their portion of the debt, the other party is still legally responsible for the debt even if a legal agreement assigns the debt to the other party. This option leaves both spouses vulnerable and should be avoided where possible.