Bankruptcy cannot discharge court-ordered obligations of child support, alimony or equitable distribution. That means that even if you declare bankruptcy, you must pay support to your family. It also means that if there is any money that will be divided among creditors, the family comes first.
But what if you are not legally married? Or if you are and you and your ex just want a legal separation, not a divorce? Many couples who mediate or go through the collaborative process want a separation agreement, without planning to file it in court. They are legal contracts, but the child support or "palimony" are not court-ordered. Would those be discharged from bankruptcy? Well, it seems that public policy would dictate that whatever money there is should still go to the family first. But why risk it?
You and your ex can agree to let the other know if you are thinking of declaring bankruptcy, to give the other a chance to go to family court to get a court order for child or "spousal" support. That would keep your priorities straight - and make sure your kids get fed before the credit card companies.
If only the federal government thought that way!